.class public Lcom/nemustech/regina/ElementLocator;
.super Ljava/lang/Object;
.source "ElementLocator.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;,
        Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;
    }
.end annotation


# static fields
.field private static final EPSILON:F = 1.0E-7f

.field public static final HMARGIN_RATIO:F = 1.0f

.field public static final HSTEP_RATIO:F = 0.5f

.field public static final MODE_NORMAL:I = 0x0

.field public static final MODE_SECRET:I = 0x1

.field public static final SCROLL_STATE_OFF:I = 0x0

.field public static final SCROLL_STATE_ON:I = 0x1

.field private static final TAG:Ljava/lang/String; = "ElementLocator"

.field public static final VMARGIN_RATIO:F = 0.25f

.field public static final VSTEP_RATIO:F = 0.25f

.field private static final WORKSPACE_NAME_HIDE_DELAY:I = 0x3e8

.field private static final WORKSPACE_NAME_SHOW_DURATION:I = 0x3e8


# instance fields
.field private mDefaultZPos:F

.field private mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

.field mEndToastResetRunnable:Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;

.field private mHandler:Landroid/os/Handler;

.field private mHolderMoveListener:Lcom/nemustech/tiffany/world/TFSimpleHolder$OnMoveListener;

.field private mHolderShiftListener:Lcom/nemustech/tiffany/world/TFHolder$OnObjectShiftListener;

.field private mIsSecretWorkspaceCached:Z

.field private mIsShowEndWorkspaceToast:Z

.field private mLastViewedWorkspaceUID:I

.field private mObjectShiftDelayedTask:Ljava/lang/Runnable;

.field private mPrevWorkspaceIdx:[I

.field private mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

.field private mReginaPref:Lcom/nemustech/regina/ReginaPreference;

.field private mResCare:Lcom/nemustech/regina/ResourceCare;

.field private mSafeMargin:F

.field private mScreenHeight:I

.field private mScreenWidth:I

.field mScrollRunnable:Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;

.field private mScrollState:I

.field private mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

.field private mWorkspaceEndToast:Landroid/widget/Toast;

.field private mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

.field private mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

.field private mWorld:Lcom/nemustech/tiffany/world/TFWorld;

.field private mZoomCorrectionRatio:F

.field private mZoomZPos:F


# direct methods
.method public constructor <init>(Lcom/nemustech/regina/ReginaLauncher;Lcom/nemustech/tiffany/world/TFWorld;)V
    .locals 13
    .parameter "reginaLauncher"
    .parameter "world"

    .prologue
    .line 105
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 56
    const/4 v8, 0x2

    new-array v8, v8, [I

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mPrevWorkspaceIdx:[I

    .line 57
    new-instance v8, Landroid/os/Handler;

    invoke-direct {v8}, Landroid/os/Handler;-><init>()V

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    .line 68
    const/high16 v8, -0x4080

    iput v8, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    .line 87
    const/4 v8, 0x2

    new-array v8, v8, [Lcom/nemustech/regina/RGWorkspaceHolder;

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    .line 88
    const/4 v8, 0x2

    new-array v8, v8, [Lcom/nemustech/tiffany/world/TFObjectProvider;

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    .line 89
    const/4 v8, 0x2

    new-array v8, v8, [Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    .line 90
    const/4 v8, 0x2

    new-array v8, v8, [Lcom/nemustech/regina/WorkspaceBrowser;

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    .line 245
    new-instance v8, Lcom/nemustech/regina/ElementLocator$1;

    invoke-direct {v8, p0}, Lcom/nemustech/regina/ElementLocator$1;-><init>(Lcom/nemustech/regina/ElementLocator;)V

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mHolderShiftListener:Lcom/nemustech/tiffany/world/TFHolder$OnObjectShiftListener;

    .line 281
    new-instance v8, Lcom/nemustech/regina/ElementLocator$2;

    invoke-direct {v8, p0}, Lcom/nemustech/regina/ElementLocator$2;-><init>(Lcom/nemustech/regina/ElementLocator;)V

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mHolderMoveListener:Lcom/nemustech/tiffany/world/TFSimpleHolder$OnMoveListener;

    .line 106
    iput-object p1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    .line 107
    iput-object p2, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    .line 108
    const/4 v8, 0x0

    iput-boolean v8, p0, Lcom/nemustech/regina/ElementLocator;->mIsShowEndWorkspaceToast:Z

    .line 109
    new-instance v8, Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;

    const/4 v9, 0x0

    invoke-direct {v8, p0, v9}, Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;-><init>(Lcom/nemustech/regina/ElementLocator;Lcom/nemustech/regina/ElementLocator$1;)V

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mEndToastResetRunnable:Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;

    .line 111
    const/4 v8, 0x0

    iput v8, p0, Lcom/nemustech/regina/ElementLocator;->mScrollState:I

    .line 113
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v8}, Lcom/nemustech/regina/ResourceCare;->getResourceCare(Landroid/content/Context;)Lcom/nemustech/regina/ResourceCare;

    move-result-object v8

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    .line 114
    invoke-virtual {p1}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v8

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaPref:Lcom/nemustech/regina/ReginaPreference;

    .line 116
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v9, 0x7f06009d

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/ResourceCare;->getDimensionD(I)F

    move-result v8

    iput v8, p0, Lcom/nemustech/regina/ElementLocator;->mZoomZPos:F

    .line 117
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v9, 0x7f06009e

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/ResourceCare;->getDimensionD(I)F

    move-result v8

    iput v8, p0, Lcom/nemustech/regina/ElementLocator;->mDefaultZPos:F

    .line 118
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v8}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v8

    iput v8, p0, Lcom/nemustech/regina/ElementLocator;->mScreenWidth:I

    .line 119
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v8}, Lcom/nemustech/regina/RUtils;->getScreenHeightAvailable(Landroid/content/Context;)I

    move-result v8

    iput v8, p0, Lcom/nemustech/regina/ElementLocator;->mScreenHeight:I

    .line 121
    new-instance v8, Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;

    invoke-direct {v8, p0}, Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;-><init>(Lcom/nemustech/regina/ElementLocator;)V

    iput-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mScrollRunnable:Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;

    .line 122
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    const/4 v9, -0x1

    invoke-static {v8, v9}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v8

    iput v8, p0, Lcom/nemustech/regina/ElementLocator;->mSafeMargin:F

    .line 126
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    const/4 v8, 0x2

    if-ge v1, v8, :cond_3

    .line 128
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    new-instance v9, Lcom/nemustech/regina/RGWorkspaceHolder;

    const/high16 v10, 0x3f80

    invoke-direct {v9, p1, v10}, Lcom/nemustech/regina/RGWorkspaceHolder;-><init>(Lcom/nemustech/regina/ReginaLauncher;F)V

    aput-object v9, v8, v1

    .line 129
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "Workspace holder id:"

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    iput-object v9, v8, Lcom/nemustech/regina/RGWorkspaceHolder;->mDescription:Ljava/lang/String;

    .line 130
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    iget-object v9, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->attachTo(Lcom/nemustech/tiffany/world/TFWorld;)V

    .line 131
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    invoke-virtual {p1}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v9

    const/4 v10, 0x0

    invoke-virtual {v9, v10}, Lcom/nemustech/regina/ReginaPreference;->getWorkspaceEndless(Z)Z

    move-result v9

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setEndlessMode(Z)V

    .line 133
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    const/4 v9, 0x0

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setFadingEffect(Z)V

    .line 134
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    invoke-virtual {v8}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v8

    const v9, 0x3f4ccccd

    invoke-virtual {v8, v9}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->setInertia(F)V

    .line 136
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    new-instance v9, Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v10, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v11, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v11, v11, v1

    invoke-direct {v9, v10, v11, p0}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;-><init>(Lcom/nemustech/regina/ReginaLauncher;Lcom/nemustech/regina/RGWorkspaceHolder;Lcom/nemustech/regina/ElementLocator;)V

    aput-object v9, v8, v1

    .line 138
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    new-instance v9, Lcom/nemustech/regina/WorkspaceBrowser;

    invoke-direct {v9}, Lcom/nemustech/regina/WorkspaceBrowser;-><init>()V

    aput-object v9, v8, v1

    .line 139
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    aget-object v8, v8, v1

    iget-object v9, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v10, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v10, v10, v1

    iget-object v11, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    const/4 v12, 0x0

    invoke-virtual {v11, v12}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v11

    invoke-virtual {v8, v9, v10, p0, v11}, Lcom/nemustech/regina/WorkspaceBrowser;->setEnvironment(Lcom/nemustech/regina/ReginaLauncher;Lcom/nemustech/regina/RGWorkspaceHolder;Lcom/nemustech/regina/ElementLocator;Landroid/view/ViewGroup;)V

    .line 142
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    aget-object v8, v8, v1

    invoke-virtual {p1}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v9

    const/4 v10, 0x0

    invoke-virtual {v9, v10}, Lcom/nemustech/regina/ReginaPreference;->getWorkspaceEndless(Z)Z

    move-result v9

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/WorkspaceBrowser;->setEndlessMode(Z)V

    .line 145
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    new-instance v9, Lcom/nemustech/tiffany/world/TFObjectProvider;

    invoke-direct {v9}, Lcom/nemustech/tiffany/world/TFObjectProvider;-><init>()V

    aput-object v9, v8, v1

    .line 147
    if-nez v1, :cond_0

    const/4 v8, 0x0

    move v3, v8

    .line 148
    .local v3, isSecret:Z
    :goto_1
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaPref:Lcom/nemustech/regina/ReginaPreference;

    invoke-virtual {v8, v3}, Lcom/nemustech/regina/ReginaPreference;->getWorkspaceCount(Z)I

    move-result v6

    .line 150
    .local v6, workspaceCount:I
    const/4 v4, 0x0

    .local v4, j:I
    :goto_2
    if-ge v4, v6, :cond_1

    .line 151
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaPref:Lcom/nemustech/regina/ReginaPreference;

    invoke-virtual {v8, v4, v3}, Lcom/nemustech/regina/ReginaPreference;->getWorkspaceUID(IZ)I

    move-result v5

    .line 152
    .local v5, uid:I
    const-string v8, "ElementLocator"

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "Loaded uid for index "

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    const-string v10, " is "

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    const-string v10, " mode:"

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    const/4 v10, 0x1

    invoke-static {v8, v9, v10}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 154
    invoke-virtual {p0, v1, v5}, Lcom/nemustech/regina/ElementLocator;->addWorkspace(II)V

    .line 150
    add-int/lit8 v4, v4, 0x1

    goto :goto_2

    .line 147
    .end local v3           #isSecret:Z
    .end local v4           #j:I
    .end local v5           #uid:I
    .end local v6           #workspaceCount:I
    :cond_0
    const/4 v8, 0x1

    move v3, v8

    goto :goto_1

    .line 157
    .restart local v3       #isSecret:Z
    .restart local v4       #j:I
    .restart local v6       #workspaceCount:I
    :cond_1
    const/4 v8, 0x1

    sub-int v8, v6, v8

    div-int/lit8 v2, v8, 0x2

    .line 158
    .local v2, initialWorkspaceIndex:I
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    iget-object v9, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v9, v9, v1

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setItemProvider(Lcom/nemustech/tiffany/world/TFItemProvider;)V

    .line 159
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    const/4 v9, 0x0

    invoke-virtual {v8, v2, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setHeadItemIndex(IZ)V

    .line 160
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    invoke-virtual {v8}, Lcom/nemustech/regina/RGWorkspaceHolder;->refreshHolder()V

    .line 162
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    iget-object v9, p0, Lcom/nemustech/regina/ElementLocator;->mHolderShiftListener:Lcom/nemustech/tiffany/world/TFHolder$OnObjectShiftListener;

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setObjectShiftListener(Lcom/nemustech/tiffany/world/TFHolder$OnObjectShiftListener;)V

    .line 163
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v8, v8, v1

    iget-object v9, p0, Lcom/nemustech/regina/ElementLocator;->mHolderMoveListener:Lcom/nemustech/tiffany/world/TFSimpleHolder$OnMoveListener;

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setOnMoveListener(Lcom/nemustech/tiffany/world/TFSimpleHolder$OnMoveListener;)V

    .line 169
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v8, v3}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v7

    .line 171
    .local v7, workspaceViewGroup:Landroid/view/ViewGroup;
    const/4 v8, 0x1

    sub-int v8, v2, v8

    add-int/2addr v8, v6

    rem-int v0, v8, v6

    .line 172
    .local v0, curViewIndex:I
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mPrevWorkspaceIdx:[I

    aput v2, v8, v1

    .line 174
    const/4 v4, 0x0

    :goto_3
    if-ge v4, v6, :cond_2

    .line 175
    invoke-virtual {p0, v1, v0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceView(II)Lcom/nemustech/regina/WorkspaceView;

    move-result-object v8

    new-instance v9, Landroid/view/ViewGroup$LayoutParams;

    const/4 v10, -0x1

    const/4 v11, -0x1

    invoke-direct {v9, v10, v11}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    invoke-virtual {v7, v8, v9}, Landroid/view/ViewGroup;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 179
    add-int/lit8 v8, v0, 0x1

    rem-int v0, v8, v6

    .line 174
    add-int/lit8 v4, v4, 0x1

    goto :goto_3

    .line 182
    :cond_2
    invoke-virtual {v7}, Landroid/view/ViewGroup;->requestLayout()V

    .line 183
    invoke-virtual {v7}, Landroid/view/ViewGroup;->invalidate()V

    .line 126
    add-int/lit8 v1, v1, 0x1

    goto/16 :goto_0

    .line 187
    .end local v0           #curViewIndex:I
    .end local v2           #initialWorkspaceIndex:I
    .end local v3           #isSecret:Z
    .end local v4           #j:I
    .end local v6           #workspaceCount:I
    .end local v7           #workspaceViewGroup:Landroid/view/ViewGroup;
    :cond_3
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    const/4 v9, 0x1

    aget-object v8, v8, v9

    const/4 v9, 0x0

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setVisibility(Z)V

    .line 190
    invoke-direct {p0}, Lcom/nemustech/regina/ElementLocator;->checkWorkspaceUIDIntegrity()V

    .line 191
    return-void
.end method

.method static synthetic access$002(Lcom/nemustech/regina/ElementLocator;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput-boolean p1, p0, Lcom/nemustech/regina/ElementLocator;->mIsShowEndWorkspaceToast:Z

    return p1
.end method

.method static synthetic access$200(Lcom/nemustech/regina/ElementLocator;)Lcom/nemustech/regina/ReginaLauncher;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    return-object v0
.end method

.method static synthetic access$300(Lcom/nemustech/regina/ElementLocator;)Ljava/lang/Runnable;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mObjectShiftDelayedTask:Ljava/lang/Runnable;

    return-object v0
.end method

.method static synthetic access$302(Lcom/nemustech/regina/ElementLocator;Ljava/lang/Runnable;)Ljava/lang/Runnable;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    iput-object p1, p0, Lcom/nemustech/regina/ElementLocator;->mObjectShiftDelayedTask:Ljava/lang/Runnable;

    return-object p1
.end method

.method static synthetic access$400(Lcom/nemustech/regina/ElementLocator;)Landroid/os/Handler;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$500(Lcom/nemustech/regina/ElementLocator;)[Lcom/nemustech/regina/RGWorkspaceHolder;
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    return-object v0
.end method

.method static synthetic access$600(Lcom/nemustech/regina/ElementLocator;)[I
    .locals 1
    .parameter "x0"

    .prologue
    .line 27
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mPrevWorkspaceIdx:[I

    return-object v0
.end method

.method static synthetic access$700(Lcom/nemustech/regina/ElementLocator;I)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 27
    invoke-direct {p0, p1}, Lcom/nemustech/regina/ElementLocator;->removeUselessWorkspaceViews(I)V

    return-void
.end method

.method private addSecretWorkspaceViewAll()V
    .locals 9

    .prologue
    const/4 v8, -0x1

    const/4 v7, 0x1

    .line 214
    const/4 v3, 0x0

    .line 215
    .local v3, secretWorkspaceCount:I
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5, v7}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v4

    .line 217
    .local v4, secretWorkspaceViewGroup:Landroid/view/ViewGroup;
    const/4 v2, 0x0

    .line 218
    .local v2, initWsIndex:I
    const/4 v0, 0x0

    .line 225
    .local v0, curWsIndex:I
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v5, v5, v7

    invoke-virtual {v5}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v3

    .line 226
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v5, v5, v7

    invoke-virtual {v5}, Lcom/nemustech/regina/RGWorkspaceHolder;->getCurrentWorkspaceIndex()I

    move-result v2

    .line 228
    invoke-virtual {v4}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v5

    if-lez v5, :cond_0

    .line 229
    invoke-virtual {v4}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 232
    :cond_0
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mPrevWorkspaceIdx:[I

    aput v2, v5, v7

    .line 233
    sub-int v5, v2, v7

    add-int/2addr v5, v3

    rem-int v0, v5, v3

    .line 234
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v3, :cond_1

    .line 235
    invoke-virtual {p0, v7, v0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceView(II)Lcom/nemustech/regina/WorkspaceView;

    move-result-object v5

    new-instance v6, Landroid/view/ViewGroup$LayoutParams;

    invoke-direct {v6, v8, v8}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    invoke-virtual {v4, v5, v6}, Landroid/view/ViewGroup;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 240
    add-int/lit8 v5, v0, 0x1

    rem-int v0, v5, v3

    .line 234
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 242
    :cond_1
    return-void
.end method

.method private availableSpace(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;)Landroid/graphics/RectF;
    .locals 1
    .parameter "rtNew"
    .parameter "exception"

    .prologue
    .line 1115
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/nemustech/regina/ElementLocator;->availableSpace(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;Lcom/nemustech/regina/RGWorkspace;)Landroid/graphics/RectF;

    move-result-object v0

    return-object v0
.end method

.method private availableSpace(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;Lcom/nemustech/regina/RGWorkspace;)Landroid/graphics/RectF;
    .locals 11
    .parameter "rtNew"
    .parameter "exception"
    .parameter "ws"

    .prologue
    const/4 v10, 0x0

    const/4 v9, 0x1

    .line 1121
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspace()Lcom/nemustech/regina/RGWorkspace;

    move-result-object v6

    .line 1122
    .local v6, workSpace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v6}, Lcom/nemustech/regina/RGWorkspace;->getElementList()Ljava/util/ArrayList;

    move-result-object v3

    .line 1123
    .local v3, elementList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    new-instance v5, Landroid/graphics/RectF;

    invoke-direct {v5}, Landroid/graphics/RectF;-><init>()V

    .line 1125
    .local v5, rtOld:Landroid/graphics/RectF;
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspaceIndex()I

    move-result v1

    .line 1126
    .local v1, curWorkspace:I
    const/4 v0, 0x0

    .line 1128
    .local v0, checkWorkspace:Z
    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v4

    .local v4, i$:Ljava/util/Iterator;
    :cond_0
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-eqz v7, :cond_4

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/nemustech/regina/Element;

    .line 1129
    .local v2, e:Lcom/nemustech/regina/Element;
    if-eqz p3, :cond_2

    .line 1130
    invoke-virtual {p3}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v7

    invoke-virtual {v2}, Lcom/nemustech/regina/Element;->getWorkspace()Lcom/nemustech/regina/RGWorkspace;

    move-result-object v8

    invoke-virtual {v8}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v8

    if-ne v7, v8, :cond_1

    move v0, v9

    .line 1135
    :goto_0
    invoke-virtual {v2}, Lcom/nemustech/regina/Element;->canBeRepositioned()Z

    move-result v7

    if-ne v7, v9, :cond_0

    if-eqz v0, :cond_0

    if-eq v2, p2, :cond_0

    .line 1142
    iget v7, p0, Lcom/nemustech/regina/ElementLocator;->mSafeMargin:F

    invoke-direct {p0, v5, v2, v7}, Lcom/nemustech/regina/ElementLocator;->fillRectF(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;F)V

    .line 1145
    invoke-static {v5, p1}, Landroid/graphics/RectF;->intersects(Landroid/graphics/RectF;Landroid/graphics/RectF;)Z

    move-result v7

    if-eqz v7, :cond_0

    move-object v7, v5

    .line 1150
    .end local v2           #e:Lcom/nemustech/regina/Element;
    :goto_1
    return-object v7

    .restart local v2       #e:Lcom/nemustech/regina/Element;
    :cond_1
    move v0, v10

    .line 1130
    goto :goto_0

    .line 1132
    :cond_2
    invoke-virtual {v2}, Lcom/nemustech/regina/Element;->getWorkspaceIndex()I

    move-result v7

    if-ne v7, v1, :cond_3

    move v0, v9

    :goto_2
    goto :goto_0

    :cond_3
    move v0, v10

    goto :goto_2

    .line 1150
    .end local v2           #e:Lcom/nemustech/regina/Element;
    :cond_4
    const/4 v7, 0x0

    goto :goto_1
.end method

.method private checkWorkspaceUIDIntegrity()V
    .locals 10

    .prologue
    const/4 v9, 0x1

    .line 195
    const-string v7, "ElementLocator"

    const-string v8, "+++Check UID integrity+++"

    invoke-static {v7, v8, v9}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 197
    const/4 v2, 0x0

    .local v2, j:I
    :goto_0
    const/4 v7, 0x2

    if-ge v2, v7, :cond_4

    .line 198
    if-nez v2, :cond_0

    const/4 v7, 0x0

    move v1, v7

    .line 199
    .local v1, isSecret:Z
    :goto_1
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mReginaPref:Lcom/nemustech/regina/ReginaPreference;

    invoke-virtual {v7, v1}, Lcom/nemustech/regina/ReginaPreference;->getWorkspaceCount(Z)I

    move-result v6

    .line 200
    .local v6, workspaceCount:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_2
    sub-int v7, v6, v9

    if-ge v0, v7, :cond_3

    .line 201
    add-int/lit8 v3, v0, 0x1

    .local v3, k:I
    :goto_3
    if-ge v3, v6, :cond_2

    .line 202
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mReginaPref:Lcom/nemustech/regina/ReginaPreference;

    invoke-virtual {v7, v0, v1}, Lcom/nemustech/regina/ReginaPreference;->getWorkspaceUID(IZ)I

    move-result v4

    .line 203
    .local v4, uid1:I
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mReginaPref:Lcom/nemustech/regina/ReginaPreference;

    invoke-virtual {v7, v3, v1}, Lcom/nemustech/regina/ReginaPreference;->getWorkspaceUID(IZ)I

    move-result v5

    .line 204
    .local v5, uid2:I
    if-ne v4, v5, :cond_1

    .line 205
    new-instance v7, Ljava/lang/IllegalStateException;

    const-string v8, "Workspace UID corrupted, uninstall launcher."

    invoke-direct {v7, v8}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v7

    .end local v0           #i:I
    .end local v1           #isSecret:Z
    .end local v3           #k:I
    .end local v4           #uid1:I
    .end local v5           #uid2:I
    .end local v6           #workspaceCount:I
    :cond_0
    move v1, v9

    .line 198
    goto :goto_1

    .line 201
    .restart local v0       #i:I
    .restart local v1       #isSecret:Z
    .restart local v3       #k:I
    .restart local v4       #uid1:I
    .restart local v5       #uid2:I
    .restart local v6       #workspaceCount:I
    :cond_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_3

    .line 200
    .end local v4           #uid1:I
    .end local v5           #uid2:I
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    .line 197
    .end local v3           #k:I
    :cond_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 210
    .end local v0           #i:I
    .end local v1           #isSecret:Z
    .end local v6           #workspaceCount:I
    :cond_4
    const-string v7, "ElementLocator"

    const-string v8, "---Check UID integrity---"

    invoke-static {v7, v8}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 211
    return-void
.end method

.method private fillRect(Landroid/graphics/Rect;Lcom/nemustech/regina/Element;)V
    .locals 8
    .parameter "rect"
    .parameter "element"

    .prologue
    .line 975
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getX()F

    move-result v0

    .line 976
    .local v0, cx:F
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getY()F

    move-result v1

    .line 978
    .local v1, cy:F
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getWidth2D()I

    move-result v3

    .line 979
    .local v3, pixelWidth:I
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getHeight2D()I

    move-result v2

    .line 981
    .local v2, pixelHeight:I
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v6, v0}, Lcom/nemustech/regina/RUtils;->convertTo2DPosX(Landroid/content/Context;F)I

    move-result v6

    div-int/lit8 v7, v3, 0x2

    sub-int v4, v6, v7

    .line 982
    .local v4, x:I
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v6, v1}, Lcom/nemustech/regina/RUtils;->convertTo2DPosY(Landroid/content/Context;F)I

    move-result v6

    div-int/lit8 v7, v2, 0x2

    sub-int v5, v6, v7

    .line 984
    .local v5, y:I
    add-int v6, v4, v3

    add-int v7, v5, v2

    invoke-virtual {p1, v4, v5, v6, v7}, Landroid/graphics/Rect;->set(IIII)V

    .line 985
    return-void
.end method

.method private fillRectF(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;F)V
    .locals 10
    .parameter "rect"
    .parameter "element"
    .parameter "margin"

    .prologue
    const/4 v9, 0x0

    const/high16 v7, 0x3f80

    const/high16 v8, 0x4000

    .line 938
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->isZoomed()Z

    move-result v5

    if-eqz v5, :cond_1

    .line 939
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getX()F

    move-result v5

    iget v6, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    div-float v6, v7, v6

    mul-float v0, v5, v6

    .line 940
    .local v0, cx:F
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getY()F

    move-result v5

    iget v6, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    div-float v6, v7, v6

    mul-float v1, v5, v6

    .line 948
    .local v1, cy:F
    :goto_0
    :try_start_0
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getWidth3D()F

    move-result v4

    .line 949
    .local v4, width:F
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getHeight3D()F

    move-result v3

    .line 951
    .local v3, height:F
    cmpg-float v5, v4, v9

    if-lez v5, :cond_0

    cmpg-float v5, v3, v9

    if-gtz v5, :cond_2

    .line 952
    :cond_0
    new-instance v5, Ljava/util/zip/DataFormatException;

    const-string v6, "Invalid element size. Did you set width & height?"

    invoke-direct {v5, v6}, Ljava/util/zip/DataFormatException;-><init>(Ljava/lang/String;)V

    throw v5
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 955
    .end local v3           #height:F
    .end local v4           #width:F
    :catch_0
    move-exception v5

    move-object v2, v5

    .line 956
    .local v2, e:Ljava/lang/Exception;
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    .line 970
    .end local v2           #e:Ljava/lang/Exception;
    :goto_1
    return-void

    .line 942
    .end local v0           #cx:F
    .end local v1           #cy:F
    :cond_1
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getX()F

    move-result v0

    .line 943
    .restart local v0       #cx:F
    invoke-virtual {p2}, Lcom/nemustech/regina/Element;->getY()F

    move-result v1

    .restart local v1       #cy:F
    goto :goto_0

    .line 960
    .restart local v3       #height:F
    .restart local v4       #width:F
    :cond_2
    mul-float v5, p3, v7

    mul-float/2addr v5, v8

    add-float/2addr v4, v5

    .line 961
    const/high16 v5, 0x3e80

    mul-float/2addr v5, p3

    mul-float/2addr v5, v8

    add-float/2addr v3, v5

    .line 963
    div-float v5, v4, v8

    sub-float v5, v0, v5

    div-float v6, v3, v8

    add-float/2addr v6, v1

    sub-float/2addr v6, v3

    div-float v7, v4, v8

    sub-float v7, v0, v7

    add-float/2addr v7, v4

    div-float v8, v3, v8

    add-float/2addr v8, v1

    invoke-virtual {p1, v5, v6, v7, v8}, Landroid/graphics/RectF;->set(FFFF)V

    goto :goto_1
.end method

.method private getSnappedPosition(II)I
    .locals 2
    .parameter "margin"
    .parameter "realPosition"

    .prologue
    .line 989
    const/4 v1, 0x1

    sub-int v1, p2, v1

    div-int/2addr v1, p1

    add-int/lit8 v1, v1, 0x1

    mul-int v0, v1, p1

    .line 990
    .local v0, snappedPosition:I
    return v0
.end method

.method private prvGetPossibleLocation(Lcom/nemustech/regina/Element;[FZLcom/nemustech/regina/RGWorkspace;)Z
    .locals 23
    .parameter "element"
    .parameter "position"
    .parameter "bIgnoreTopMargin"
    .parameter "ws"

    .prologue
    .line 1065
    const-string v20, "ElementLocator"

    const-string v21, "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"

    const/16 v22, 0x0

    invoke-static/range {v20 .. v22}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 1066
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v20, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/ElementLocator;->mScreenWidth:I

    move/from16 v21, v0

    invoke-static/range {v20 .. v21}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v11

    .line 1068
    .local v11, screenWidth:F
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v20, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/ElementLocator;->mScreenHeight:I

    move/from16 v21, v0

    invoke-static/range {v20 .. v21}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v10

    .line 1070
    .local v10, screenHeight:F
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v20, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v21, v0

    invoke-virtual/range {v21 .. v21}, Lcom/nemustech/regina/ResourceCare;->getWCBHeight()I

    move-result v21

    invoke-static/range {v20 .. v21}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v16

    .line 1073
    .local v16, tabBarHeight:F
    new-instance v9, Landroid/graphics/RectF;

    invoke-direct {v9}, Landroid/graphics/RectF;-><init>()V

    .line 1074
    .local v9, rtNew:Landroid/graphics/RectF;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v20, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v21, v0

    const v22, 0x7f060002

    invoke-virtual/range {v21 .. v22}, Lcom/nemustech/regina/ResourceCare;->getDimensionF(I)F

    move-result v21

    invoke-static/range {v20 .. v21}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;F)F

    move-result v6

    .line 1076
    .local v6, margin:F
    const/high16 v20, 0x3f00

    mul-float v14, v6, v20

    .line 1077
    .local v14, stepH:F
    const/high16 v20, 0x3e80

    mul-float v15, v6, v20

    .line 1079
    .local v15, stepV:F
    move-object/from16 v0, p1

    instance-of v0, v0, Lcom/nemustech/regina/ElementAndroidWidget;

    move/from16 v20, v0

    if-eqz v20, :cond_0

    const/16 v20, 0x0

    :goto_0
    move-object/from16 v0, p0

    move-object v1, v9

    move-object/from16 v2, p1

    move/from16 v3, v20

    invoke-direct {v0, v1, v2, v3}, Lcom/nemustech/regina/ElementLocator;->fillRectF(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;F)V

    .line 1081
    invoke-virtual {v9}, Landroid/graphics/RectF;->width()F

    move-result v17

    .line 1082
    .local v17, width:F
    invoke-virtual {v9}, Landroid/graphics/RectF;->height()F

    move-result v5

    .line 1084
    .local v5, height:F
    const/16 v20, 0x0

    sub-float v21, v17, v11

    const/high16 v22, 0x4000

    div-float v21, v21, v22

    invoke-static/range {v20 .. v21}, Ljava/lang/Math;->min(FF)F

    move-result v12

    .line 1085
    .local v12, startX:F
    sub-float v20, v10, v5

    const/high16 v21, 0x4000

    div-float v13, v20, v21

    .line 1089
    .local v13, startY:F
    if-eqz p3, :cond_1

    const/16 v20, 0x0

    :goto_1
    sub-float v8, v13, v20

    .line 1090
    .local v8, offsetStart:F
    sub-float v7, v16, v13

    .line 1094
    .local v7, offsetEnd:F
    move/from16 v19, v8

    .local v19, y:F
    :goto_2
    cmpl-float v20, v19, v7

    if-ltz v20, :cond_6

    .line 1095
    move/from16 v18, v12

    .local v18, x:F
    :goto_3
    move v0, v12

    neg-float v0, v0

    move/from16 v20, v0

    cmpg-float v20, v18, v20

    if-gtz v20, :cond_4

    .line 1098
    const/high16 v20, 0x4000

    div-float v20, v17, v20

    sub-float v20, v18, v20

    move/from16 v0, v20

    move-object v1, v9

    iput v0, v1, Landroid/graphics/RectF;->left:F

    .line 1099
    move-object v0, v9

    iget v0, v0, Landroid/graphics/RectF;->left:F

    move/from16 v20, v0

    add-float v20, v20, v17

    move/from16 v0, v20

    move-object v1, v9

    iput v0, v1, Landroid/graphics/RectF;->right:F

    .line 1100
    const/high16 v20, 0x4000

    div-float v20, v5, v20

    sub-float v20, v19, v20

    move/from16 v0, v20

    move-object v1, v9

    iput v0, v1, Landroid/graphics/RectF;->top:F

    .line 1101
    move-object v0, v9

    iget v0, v0, Landroid/graphics/RectF;->top:F

    move/from16 v20, v0

    add-float v20, v20, v5

    move/from16 v0, v20

    move-object v1, v9

    iput v0, v1, Landroid/graphics/RectF;->bottom:F

    .line 1103
    const/16 v20, 0x0

    move-object/from16 v0, p0

    move-object v1, v9

    move-object/from16 v2, v20

    move-object/from16 v3, p4

    invoke-direct {v0, v1, v2, v3}, Lcom/nemustech/regina/ElementLocator;->availableSpace(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;Lcom/nemustech/regina/RGWorkspace;)Landroid/graphics/RectF;

    move-result-object v4

    .line 1104
    .local v4, collisionRect:Landroid/graphics/RectF;
    if-nez v4, :cond_2

    .line 1105
    const/16 v20, 0x0

    aput v18, p2, v20

    .line 1106
    const/16 v20, 0x1

    aput v19, p2, v20

    .line 1107
    const/16 v20, 0x1

    .line 1111
    .end local v4           #collisionRect:Landroid/graphics/RectF;
    .end local v18           #x:F
    :goto_4
    return v20

    .end local v5           #height:F
    .end local v7           #offsetEnd:F
    .end local v8           #offsetStart:F
    .end local v12           #startX:F
    .end local v13           #startY:F
    .end local v17           #width:F
    .end local v19           #y:F
    :cond_0
    move/from16 v20, v6

    .line 1079
    goto/16 :goto_0

    .line 1089
    .restart local v5       #height:F
    .restart local v12       #startX:F
    .restart local v13       #startY:F
    .restart local v17       #width:F
    :cond_1
    const/high16 v20, 0x3f40

    mul-float v20, v20, v6

    goto :goto_1

    .line 1095
    .restart local v4       #collisionRect:Landroid/graphics/RectF;
    .restart local v7       #offsetEnd:F
    .restart local v8       #offsetStart:F
    .restart local v18       #x:F
    .restart local v19       #y:F
    :cond_2
    move v0, v12

    neg-float v0, v0

    move/from16 v20, v0

    cmpg-float v20, v18, v20

    if-gez v20, :cond_3

    add-float v20, v18, v14

    move v0, v12

    neg-float v0, v0

    move/from16 v21, v0

    cmpl-float v20, v20, v21

    if-lez v20, :cond_3

    move v0, v12

    neg-float v0, v0

    move/from16 v20, v0

    move/from16 v18, v20

    :goto_5
    goto :goto_3

    :cond_3
    add-float v20, v18, v14

    move/from16 v18, v20

    goto :goto_5

    .line 1094
    .end local v4           #collisionRect:Landroid/graphics/RectF;
    :cond_4
    cmpl-float v20, v19, v7

    if-lez v20, :cond_5

    sub-float v20, v19, v15

    cmpg-float v20, v20, v7

    if-gez v20, :cond_5

    move/from16 v19, v7

    :goto_6
    goto/16 :goto_2

    :cond_5
    sub-float v20, v19, v15

    move/from16 v19, v20

    goto :goto_6

    .line 1111
    .end local v18           #x:F
    :cond_6
    const/16 v20, 0x0

    goto :goto_4
.end method

.method private removeUselessWorkspaceViews(I)V
    .locals 10
    .parameter "centerIndex"

    .prologue
    .line 339
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->isSecretMode()Z

    move-result v1

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v6

    .line 341
    .local v6, fWorkspaceViewGroup:Landroid/view/ViewGroup;
    invoke-virtual {v6}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v2

    .line 342
    .local v2, fWorkspaceViewCount:I
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceCount()I

    move-result v8

    .line 343
    .local v8, fWorkspaceCount:I
    move v4, p1

    .line 344
    .local v4, fCenterViewIndex:I
    const/4 v0, 0x1

    sub-int v0, p1, v0

    add-int/2addr v0, v8

    rem-int v3, v0, v8

    .line 345
    .local v3, fLeftViewIndex:I
    add-int/lit8 v0, p1, 0x1

    rem-int v5, v0, v8

    .line 346
    .local v5, fRightViewIndex:I
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v7

    .line 348
    .local v7, fMode:I
    iget-object v9, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    new-instance v0, Lcom/nemustech/regina/ElementLocator$3;

    move-object v1, p0

    invoke-direct/range {v0 .. v7}, Lcom/nemustech/regina/ElementLocator$3;-><init>(Lcom/nemustech/regina/ElementLocator;IIIILandroid/view/ViewGroup;I)V

    invoke-virtual {v9, v0}, Lcom/nemustech/regina/ReginaLauncher;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 358
    return-void
.end method


# virtual methods
.method public addWorkspace(II)V
    .locals 5
    .parameter "workspaceType"
    .parameter "uid"

    .prologue
    .line 529
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v2, v2, p1

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v0

    .line 530
    .local v0, idx:I
    const-string v2, "WorkspaceExploring"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Adding workspace - workspace index: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " GUID: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x1

    invoke-static {v2, v3, v4}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 535
    new-instance v1, Lcom/nemustech/regina/RGWorkspace;

    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    iget-object v3, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-direct {v1, v2, v3, p2}, Lcom/nemustech/regina/RGWorkspace;-><init>(Lcom/nemustech/tiffany/world/TFWorld;Lcom/nemustech/regina/ReginaLauncher;I)V

    .line 536
    .local v1, newWorkspace:Lcom/nemustech/regina/RGWorkspace;
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "RGWorkspace "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " ["

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "]"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " type:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/nemustech/regina/RGWorkspace;->mDescription:Ljava/lang/String;

    .line 538
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, p2}, Lcom/nemustech/regina/RUtils;->getWallpaperFileName(Landroid/content/Context;I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/RGWorkspace;->setWallPaper(Ljava/lang/String;)V

    .line 541
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v2, v2, p1

    invoke-virtual {v2, v0, v1}, Lcom/nemustech/tiffany/world/TFObjectProvider;->addItemAt(ILjava/lang/Object;)V

    .line 542
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v2, v2, p1

    invoke-virtual {v2}, Lcom/nemustech/regina/RGWorkspaceHolder;->refreshHolder()V

    .line 543
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    aget-object v2, v2, p1

    invoke-virtual {v2, v0, v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->addWorkspaceThumb(ILcom/nemustech/regina/RGWorkspace;)V

    .line 545
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    aget-object v2, v2, p1

    invoke-virtual {v2, v0, v1}, Lcom/nemustech/regina/WorkspaceBrowser;->addWorkspaceThumb(ILcom/nemustech/regina/RGWorkspace;)V

    .line 547
    return-void
.end method

.method public animateToWorkspace()V
    .locals 10

    .prologue
    const/4 v9, 0x0

    const/4 v8, 0x1

    .line 1409
    const/4 v4, -0x1

    .line 1410
    .local v4, workspaceIdxToReturnTo:I
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v3

    check-cast v3, Lcom/nemustech/regina/RGWorkspaceHolder;

    .line 1411
    .local v3, workspaceHolder:Lcom/nemustech/regina/RGWorkspaceHolder;
    invoke-virtual {v3}, Lcom/nemustech/regina/RGWorkspaceHolder;->getItemCount()I

    move-result v0

    .line 1413
    .local v0, count:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v0, :cond_0

    .line 1414
    invoke-virtual {v3}, Lcom/nemustech/regina/RGWorkspaceHolder;->getItemProvider()Lcom/nemustech/tiffany/world/TFItemProvider;

    move-result-object v5

    invoke-virtual {v5, v1}, Lcom/nemustech/tiffany/world/TFItemProvider;->getItem(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/nemustech/regina/RGWorkspace;

    .line 1416
    .local v2, workspace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v2}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v5

    iget v6, p0, Lcom/nemustech/regina/ElementLocator;->mLastViewedWorkspaceUID:I

    if-ne v5, v6, :cond_2

    .line 1417
    move v4, v1

    .line 1418
    const-string v5, "WorkspaceExploring"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "Transition to Workspace - workspace to return is: "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, " with GUID "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    iget v7, p0, Lcom/nemustech/regina/ElementLocator;->mLastViewedWorkspaceUID:I

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v8}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 1425
    .end local v2           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_0
    const/4 v5, -0x1

    if-ne v4, v5, :cond_1

    .line 1426
    invoke-virtual {v3}, Lcom/nemustech/regina/RGWorkspaceHolder;->getItemCount()I

    move-result v5

    sub-int/2addr v5, v8

    div-int/lit8 v4, v5, 0x2

    .line 1427
    const-string v5, "WorkspaceExploring"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "Transition to Workspace - workspace to return is: "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, " with GUID "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {p0, v4}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(I)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v7

    invoke-virtual {v7}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v8}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 1433
    :cond_1
    invoke-virtual {v3, v4, v9}, Lcom/nemustech/regina/RGWorkspaceHolder;->setHeadItemIndex(IZ)V

    .line 1434
    invoke-virtual {v3}, Lcom/nemustech/regina/RGWorkspaceHolder;->refreshHolder()V

    .line 1435
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceBrowser()Lcom/nemustech/regina/WorkspaceBrowser;

    move-result-object v5

    invoke-virtual {v5, v4, v9}, Lcom/nemustech/regina/WorkspaceBrowser;->setHeadItemIndex(IZ)V

    .line 1436
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v6}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v6

    aget-object v5, v5, v6

    invoke-virtual {v5, v4}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->animateToWorkspaceFromWorkspaceSwitcher(I)V

    .line 1438
    return-void

    .line 1413
    .restart local v2       #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_2
    add-int/lit8 v1, v1, 0x1

    goto/16 :goto_0
.end method

.method animateToWorkspaceSwitcherFrom(I)V
    .locals 4
    .parameter "currentView"

    .prologue
    .line 1393
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0}, Lcom/nemustech/regina/ReginaLauncher;->hideSelectedShortCut()V

    .line 1394
    if-nez p1, :cond_0

    .line 1395
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspaceUID()I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/ElementLocator;->mLastViewedWorkspaceUID:I

    .line 1396
    const-string v0, "WorkspaceExploring"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Transition to WorkspaceSwitcher - Last workspace index: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspaceIndex()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " GUID: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Lcom/nemustech/regina/ElementLocator;->mLastViewedWorkspaceUID:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", mWorld.isLocked="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v2}, Lcom/nemustech/regina/ReginaLauncher;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v2

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFWorld;->isLocked()Z

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ", VIEW_MODE="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v3, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v3

    invoke-virtual {v2, v3}, Lcom/nemustech/regina/ReginaLauncher;->convertViewModeToString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    invoke-static {v0, v1, v2}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 1404
    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    invoke-virtual {v0, p1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->animateToWorkspaceSwitcherFrom(I)V

    .line 1406
    return-void
.end method

.method public applyEndlessMode(Z)V
    .locals 2
    .parameter "endlessMode"

    .prologue
    .line 361
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    const/4 v1, 0x2

    if-ge v0, v1, :cond_0

    .line 362
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v1, v1, v0

    invoke-virtual {v1, p1}, Lcom/nemustech/regina/RGWorkspaceHolder;->setEndlessMode(Z)V

    .line 363
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v1, v1, v0

    invoke-virtual {v1}, Lcom/nemustech/regina/RGWorkspaceHolder;->refreshHolder()V

    .line 364
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    aget-object v1, v1, v0

    invoke-virtual {v1, p1}, Lcom/nemustech/regina/WorkspaceBrowser;->setEndlessMode(Z)V

    .line 365
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    aget-object v1, v1, v0

    invoke-virtual {v1}, Lcom/nemustech/regina/WorkspaceBrowser;->refreshHolder()V

    .line 361
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 369
    :cond_0
    return-void
.end method

.method public arrange(Lcom/nemustech/regina/Element;)Z
    .locals 1
    .parameter "element"

    .prologue
    .line 576
    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lcom/nemustech/regina/ElementLocator;->arrange(Lcom/nemustech/regina/Element;Lcom/nemustech/regina/RGWorkspace;)Z

    move-result v0

    return v0
.end method

.method public arrange(Lcom/nemustech/regina/Element;Lcom/nemustech/regina/RGWorkspace;)Z
    .locals 12
    .parameter "element"
    .parameter "ws"

    .prologue
    const/4 v11, 0x0

    const/4 v10, 0x0

    const/4 v9, 0x1

    .line 580
    const/4 v4, 0x0

    .line 581
    .local v4, result:Z
    const/4 v6, 0x2

    new-array v3, v6, [F

    .line 583
    .local v3, newCenterPos:[F
    invoke-virtual {p0, p1, v3, p2}, Lcom/nemustech/regina/ElementLocator;->getPossibleLocation(Lcom/nemustech/regina/Element;[FLcom/nemustech/regina/RGWorkspace;)Z

    move-result v6

    if-ne v6, v9, :cond_3

    .line 584
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspaceIndex()I

    move-result v1

    .line 585
    .local v1, curWorkspaceIndex:I
    const-string v6, "ElementLocator"

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "arrange() getCurrentWorkspaceIndex()="

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7, v9}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 587
    instance-of v6, p1, Lcom/nemustech/regina/ElementReginaWidget;

    if-nez v6, :cond_0

    instance-of v6, p1, Lcom/nemustech/regina/ElementShortcut;

    if-nez v6, :cond_0

    instance-of v6, p1, Lcom/nemustech/regina/ElementTrash;

    if-nez v6, :cond_0

    instance-of v6, p1, Lcom/nemustech/regina/ElementAndroidWidget;

    if-nez v6, :cond_0

    instance-of v6, p1, Lcom/nemustech/regina/ElementFolder;

    if-eqz v6, :cond_2

    .line 592
    :cond_0
    const-string v6, "ElementLocator"

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "$$$ Found possible location at "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    aget v8, v3, v10

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ","

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    aget v8, v3, v9

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, " e:"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7, v9}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 595
    move-object v5, p2

    .line 596
    .local v5, workspace:Lcom/nemustech/regina/RGWorkspace;
    aget v6, v3, v10

    aget v7, v3, v9

    invoke-virtual {p1, v6, v7, v11}, Lcom/nemustech/regina/Element;->locate(FFF)V

    .line 597
    aget v6, v3, v10

    aget v7, v3, v9

    invoke-virtual {p1, v6, v7, v11}, Lcom/nemustech/regina/Element;->setInitPos(FFF)V

    .line 598
    if-nez v5, :cond_1

    .line 599
    invoke-virtual {p1}, Lcom/nemustech/regina/Element;->getWorkspaceType()I

    move-result v6

    packed-switch v6, :pswitch_data_0

    .line 609
    new-instance v6, Ljava/lang/IllegalStateException;

    const-string v7, "The workspace type of element is WRONG !!!"

    invoke-direct {v6, v7}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v6

    .line 601
    :pswitch_0
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v6, v6, v10

    invoke-virtual {v6, v1}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItem(I)Ljava/lang/Object;

    move-result-object v5

    .end local v5           #workspace:Lcom/nemustech/regina/RGWorkspace;
    check-cast v5, Lcom/nemustech/regina/RGWorkspace;

    .line 614
    .restart local v5       #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_1
    :goto_0
    invoke-virtual {p1, v5}, Lcom/nemustech/regina/Element;->setWorkspace(Lcom/nemustech/regina/RGWorkspace;)V

    .line 616
    if-eqz v5, :cond_2

    .line 617
    invoke-virtual {v5, p1}, Lcom/nemustech/regina/RGWorkspace;->attachElement(Lcom/nemustech/regina/Element;)Z

    .line 620
    .end local v5           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_2
    const/4 v4, 0x1

    .line 644
    .end local v1           #curWorkspaceIndex:I
    .end local p1
    :goto_1
    return v4

    .line 605
    .restart local v1       #curWorkspaceIndex:I
    .restart local v5       #workspace:Lcom/nemustech/regina/RGWorkspace;
    .restart local p1
    :pswitch_1
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v6, v6, v9

    invoke-virtual {v6, v1}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItem(I)Ljava/lang/Object;

    move-result-object v5

    .end local v5           #workspace:Lcom/nemustech/regina/RGWorkspace;
    check-cast v5, Lcom/nemustech/regina/RGWorkspace;

    .line 607
    .restart local v5       #workspace:Lcom/nemustech/regina/RGWorkspace;
    goto :goto_0

    .line 622
    .end local v1           #curWorkspaceIndex:I
    .end local v5           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_3
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v7, 0x7f070005

    invoke-virtual {v6, v7}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 623
    .local v2, msg:Ljava/lang/String;
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    new-instance v7, Lcom/nemustech/regina/ElementLocator$6;

    invoke-direct {v7, p0, v2}, Lcom/nemustech/regina/ElementLocator$6;-><init>(Lcom/nemustech/regina/ElementLocator;Ljava/lang/String;)V

    invoke-virtual {v6, v7}, Lcom/nemustech/regina/ReginaLauncher;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 629
    const/4 v4, 0x0

    .line 634
    instance-of v6, p1, Lcom/nemustech/regina/ElementAndroidWidget;

    if-eqz v6, :cond_4

    .line 635
    check-cast p1, Lcom/nemustech/regina/ElementAndroidWidget;

    .end local p1
    invoke-virtual {p1}, Lcom/nemustech/regina/ElementAndroidWidget;->getWidgetId()I

    move-result v0

    .line 637
    .local v0, appWidgetId:I
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v6}, Lcom/nemustech/regina/ReginaLauncher;->getAppWidgetHost()Landroid/appwidget/AppWidgetHost;

    move-result-object v6

    invoke-virtual {v6, v0}, Landroid/appwidget/AppWidgetHost;->deleteAppWidgetId(I)V

    .line 641
    .end local v0           #appWidgetId:I
    :cond_4
    const-string v6, "ElementLocator"

    const-string v7, "$$$ Couldn\'t find possible parking lot!"

    invoke-static {v6, v7}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1

    .line 599
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public arrangeManual(Lcom/nemustech/regina/Element;FFF)V
    .locals 1
    .parameter "element"
    .parameter "locateX"
    .parameter "locateY"
    .parameter "locateZ"

    .prologue
    .line 723
    invoke-virtual {p1, p2, p3, p4}, Lcom/nemustech/regina/Element;->locate(FFF)V

    .line 726
    invoke-virtual {p1}, Lcom/nemustech/regina/Element;->getWorkspace()Lcom/nemustech/regina/RGWorkspace;

    move-result-object v0

    .line 727
    .local v0, workspace:Lcom/nemustech/regina/RGWorkspace;
    if-eqz v0, :cond_0

    .line 728
    invoke-virtual {v0, p1}, Lcom/nemustech/regina/RGWorkspace;->attachElement(Lcom/nemustech/regina/Element;)Z

    .line 730
    :cond_0
    return-void
.end method

.method public availableSpaceExceptElement(Lcom/nemustech/regina/Element;)Landroid/graphics/RectF;
    .locals 21
    .parameter "exceptElement"

    .prologue
    .line 1157
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v18, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/ElementLocator;->mScreenHeight:I

    move/from16 v19, v0

    invoke-static/range {v18 .. v19}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v18

    const/high16 v19, 0x4000

    div-float v10, v18, v19

    .line 1159
    .local v10, screenTop:F
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v18, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/ElementLocator;->mScreenWidth:I

    move/from16 v19, v0

    invoke-static/range {v18 .. v19}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v11

    .line 1161
    .local v11, screenWidth:F
    move v0, v11

    neg-float v0, v0

    move/from16 v18, v0

    const/high16 v19, 0x4000

    div-float v9, v18, v19

    .line 1162
    .local v9, screenLeft:F
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v18, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v19, v0

    const v20, 0x7f060002

    invoke-virtual/range {v19 .. v20}, Lcom/nemustech/regina/ResourceCare;->getDimensionF(I)F

    move-result v19

    invoke-static/range {v18 .. v19}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;F)F

    move-result v8

    .line 1164
    .local v8, margin:F
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    move-object/from16 v18, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v19, v0

    invoke-virtual/range {v19 .. v19}, Lcom/nemustech/regina/ResourceCare;->getWCBHeight()I

    move-result v19

    invoke-static/range {v18 .. v19}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v15

    .line 1167
    .local v15, tabBarHeight:F
    new-instance v12, Landroid/graphics/RectF;

    invoke-direct {v12}, Landroid/graphics/RectF;-><init>()V

    .line 1168
    .local v12, snappedRect:Landroid/graphics/RectF;
    move-object/from16 v0, p1

    instance-of v0, v0, Lcom/nemustech/regina/ElementAndroidWidget;

    move/from16 v18, v0

    if-eqz v18, :cond_3

    const/16 v18, 0x0

    :goto_0
    move-object/from16 v0, p0

    move-object v1, v12

    move-object/from16 v2, p1

    move/from16 v3, v18

    invoke-direct {v0, v1, v2, v3}, Lcom/nemustech/regina/ElementLocator;->fillRectF(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;F)V

    .line 1173
    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->bottom:F

    move/from16 v18, v0

    sub-float v17, v10, v18

    .line 1174
    .local v17, zeroTop:F
    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->left:F

    move/from16 v18, v0

    sub-float v16, v18, v9

    .line 1176
    .local v16, zeroLeft:F
    const/high16 v18, 0x3f00

    mul-float v13, v8, v18

    .line 1177
    .local v13, stepH:F
    const/high16 v18, 0x3e80

    mul-float v14, v8, v18

    .line 1178
    .local v14, stepV:F
    const/high16 v18, 0x4000

    div-float v18, v14, v18

    add-float v18, v18, v17

    div-float v18, v18, v14

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    mul-float v18, v18, v14

    sub-float v7, v10, v18

    .line 1180
    .local v7, gridTop:F
    const/high16 v18, 0x4000

    div-float v18, v13, v18

    add-float v18, v18, v16

    div-float v18, v18, v13

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    mul-float v18, v18, v13

    add-float v6, v9, v18

    .line 1184
    .local v6, gridLeft:F
    cmpl-float v18, v7, v10

    if-lez v18, :cond_4

    .line 1185
    move v7, v10

    .line 1189
    :cond_0
    :goto_1
    cmpg-float v18, v6, v9

    if-gez v18, :cond_5

    .line 1190
    move v6, v9

    .line 1195
    :cond_1
    :goto_2
    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->left:F

    move/from16 v18, v0

    sub-float v18, v6, v18

    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->bottom:F

    move/from16 v19, v0

    sub-float v19, v7, v19

    move-object v0, v12

    move/from16 v1, v18

    move/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Landroid/graphics/RectF;->offset(FF)V

    .line 1198
    move-object/from16 v0, p0

    move-object v1, v12

    move-object/from16 v2, p1

    invoke-direct {v0, v1, v2}, Lcom/nemustech/regina/ElementLocator;->availableSpace(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;)Landroid/graphics/RectF;

    move-result-object v18

    if-nez v18, :cond_6

    .line 1199
    move-object/from16 v0, p1

    instance-of v0, v0, Lcom/nemustech/regina/ElementAndroidWidget;

    move/from16 v18, v0

    if-nez v18, :cond_2

    .line 1200
    invoke-virtual {v12, v8, v14}, Landroid/graphics/RectF;->inset(FF)V

    :cond_2
    move-object/from16 v18, v12

    .line 1232
    :goto_3
    return-object v18

    .end local v6           #gridLeft:F
    .end local v7           #gridTop:F
    .end local v13           #stepH:F
    .end local v14           #stepV:F
    .end local v16           #zeroLeft:F
    .end local v17           #zeroTop:F
    :cond_3
    move/from16 v18, v8

    .line 1168
    goto/16 :goto_0

    .line 1186
    .restart local v6       #gridLeft:F
    .restart local v7       #gridTop:F
    .restart local v13       #stepH:F
    .restart local v14       #stepV:F
    .restart local v16       #zeroLeft:F
    .restart local v17       #zeroTop:F
    :cond_4
    invoke-virtual {v12}, Landroid/graphics/RectF;->height()F

    move-result v18

    sub-float v18, v7, v18

    move v0, v10

    neg-float v0, v0

    move/from16 v19, v0

    add-float v19, v19, v15

    cmpg-float v18, v18, v19

    if-gez v18, :cond_0

    .line 1187
    sub-float v18, v15, v10

    invoke-virtual {v12}, Landroid/graphics/RectF;->height()F

    move-result v19

    add-float v7, v18, v19

    goto :goto_1

    .line 1191
    :cond_5
    invoke-virtual {v12}, Landroid/graphics/RectF;->width()F

    move-result v18

    add-float v18, v18, v6

    move v0, v9

    neg-float v0, v0

    move/from16 v19, v0

    cmpl-float v18, v18, v19

    if-lez v18, :cond_1

    .line 1192
    move v0, v9

    neg-float v0, v0

    move/from16 v18, v0

    invoke-virtual {v12}, Landroid/graphics/RectF;->width()F

    move-result v19

    sub-float v6, v18, v19

    goto :goto_2

    .line 1204
    :cond_6
    iget v4, v12, Landroid/graphics/RectF;->left:F

    .line 1205
    .local v4, fx:F
    iget v5, v12, Landroid/graphics/RectF;->top:F

    .line 1207
    .local v5, fy:F
    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->right:F

    move/from16 v18, v0

    move v0, v9

    neg-float v0, v0

    move/from16 v19, v0

    cmpg-float v18, v18, v19

    if-gez v18, :cond_7

    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->right:F

    move/from16 v18, v0

    add-float v18, v18, v13

    move v0, v9

    neg-float v0, v0

    move/from16 v19, v0

    cmpl-float v18, v18, v19

    if-ltz v18, :cond_7

    .line 1210
    const-string v18, "ElementLocator"

    new-instance v19, Ljava/lang/StringBuilder;

    invoke-direct/range {v19 .. v19}, Ljava/lang/StringBuilder;-><init>()V

    const-string v20, "snappaedRect:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual {v12}, Landroid/graphics/RectF;->toString()Ljava/lang/String;

    move-result-object v20

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual/range {v19 .. v19}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v19

    invoke-static/range {v18 .. v19}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 1211
    const-string v18, "ElementLocator"

    new-instance v19, Ljava/lang/StringBuilder;

    invoke-direct/range {v19 .. v19}, Ljava/lang/StringBuilder;-><init>()V

    const-string v20, "sl:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object/from16 v0, v19

    move v1, v9

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    const-string v20, " sr.width:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual {v12}, Landroid/graphics/RectF;->width()F

    move-result v20

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual/range {v19 .. v19}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v19

    invoke-static/range {v18 .. v19}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 1212
    move v0, v9

    neg-float v0, v0

    move/from16 v18, v0

    invoke-virtual {v12}, Landroid/graphics/RectF;->width()F

    move-result v19

    sub-float v4, v18, v19

    .line 1213
    const-string v18, "ElementLocator"

    new-instance v19, Ljava/lang/StringBuilder;

    invoke-direct/range {v19 .. v19}, Ljava/lang/StringBuilder;-><init>()V

    const-string v20, "fx:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object/from16 v0, v19

    move v1, v4

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    const-string v20, " snappedLeft:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->left:F

    move/from16 v20, v0

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual/range {v19 .. v19}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v19

    invoke-static/range {v18 .. v19}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 1216
    :cond_7
    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->top:F

    move/from16 v18, v0

    sub-float v19, v15, v10

    cmpl-float v18, v18, v19

    if-lez v18, :cond_8

    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->top:F

    move/from16 v18, v0

    sub-float v18, v18, v14

    sub-float v19, v15, v10

    cmpg-float v18, v18, v19

    if-gtz v18, :cond_8

    .line 1219
    sub-float v5, v15, v10

    .line 1220
    const-string v18, "ElementLocator"

    new-instance v19, Ljava/lang/StringBuilder;

    invoke-direct/range {v19 .. v19}, Ljava/lang/StringBuilder;-><init>()V

    const-string v20, "fy:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object/from16 v0, v19

    move v1, v5

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    const-string v20, " snappedTop:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->top:F

    move/from16 v20, v0

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual/range {v19 .. v19}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v19

    invoke-static/range {v18 .. v19}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 1223
    :cond_8
    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->left:F

    move/from16 v18, v0

    cmpl-float v18, v4, v18

    if-nez v18, :cond_9

    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->top:F

    move/from16 v18, v0

    cmpl-float v18, v5, v18

    if-eqz v18, :cond_b

    .line 1224
    :cond_9
    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->left:F

    move/from16 v18, v0

    sub-float v18, v4, v18

    move-object v0, v12

    iget v0, v0, Landroid/graphics/RectF;->top:F

    move/from16 v19, v0

    sub-float v19, v5, v19

    move-object v0, v12

    move/from16 v1, v18

    move/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Landroid/graphics/RectF;->offset(FF)V

    .line 1225
    move-object/from16 v0, p0

    move-object v1, v12

    move-object/from16 v2, p1

    invoke-direct {v0, v1, v2}, Lcom/nemustech/regina/ElementLocator;->availableSpace(Landroid/graphics/RectF;Lcom/nemustech/regina/Element;)Landroid/graphics/RectF;

    move-result-object v18

    if-nez v18, :cond_b

    .line 1226
    const-string v18, "ElementLocator"

    new-instance v19, Ljava/lang/StringBuilder;

    invoke-direct/range {v19 .. v19}, Ljava/lang/StringBuilder;-><init>()V

    const-string v20, "Found location from third filtering. fx:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object/from16 v0, v19

    move v1, v4

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    const-string v20, " fy:"

    invoke-virtual/range {v19 .. v20}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v19

    move-object/from16 v0, v19

    move v1, v5

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v19

    invoke-virtual/range {v19 .. v19}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v19

    invoke-static/range {v18 .. v19}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 1227
    move-object/from16 v0, p1

    instance-of v0, v0, Lcom/nemustech/regina/ElementAndroidWidget;

    move/from16 v18, v0

    if-nez v18, :cond_a

    .line 1228
    invoke-virtual {v12, v8, v14}, Landroid/graphics/RectF;->inset(FF)V

    :cond_a
    move-object/from16 v18, v12

    .line 1229
    goto/16 :goto_3

    .line 1232
    :cond_b
    const/16 v18, 0x0

    goto/16 :goto_3
.end method

.method dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1
    .parameter "event"

    .prologue
    .line 1237
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    invoke-virtual {v0, p1}, Lcom/nemustech/tiffany/world/TFWorld;->dispatchEvent(Landroid/view/MotionEvent;)Z

    .line 1238
    const/4 v0, 0x1

    return v0
.end method

.method public distributeWorkspaceViews(I)V
    .locals 3
    .parameter "centerIndex"

    .prologue
    .line 467
    move v0, p1

    .line 468
    .local v0, index:I
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    new-instance v2, Lcom/nemustech/regina/ElementLocator$5;

    invoke-direct {v2, p0, v0}, Lcom/nemustech/regina/ElementLocator$5;-><init>(Lcom/nemustech/regina/ElementLocator;I)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 500
    return-void
.end method

.method public elementMoveOnZoom(Lcom/nemustech/regina/Element;FF)V
    .locals 8
    .parameter "e"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 755
    iget-object v3, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    iget v4, p0, Lcom/nemustech/regina/ElementLocator;->mScreenWidth:I

    iget v5, p0, Lcom/nemustech/regina/ElementLocator;->mScreenHeight:I

    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    invoke-virtual {v6}, Lcom/nemustech/tiffany/world/TFWorld;->getCamera()Lcom/nemustech/tiffany/world/TFCamera;

    move-result-object v6

    const/4 v7, 0x2

    invoke-virtual {v6, v7}, Lcom/nemustech/tiffany/world/TFCamera;->getLocation(I)F

    move-result v6

    iget v7, p0, Lcom/nemustech/regina/ElementLocator;->mZoomZPos:F

    sub-float/2addr v6, v7

    invoke-static {v3, v4, v5, v6}, Lcom/nemustech/tiffany/world/TFUtils;->calcRealWorldFactor(Lcom/nemustech/tiffany/world/TFWorld;IIF)F

    move-result v0

    .line 758
    .local v0, factor:F
    mul-float v1, p2, v0

    .line 759
    .local v1, locX:F
    mul-float v2, p3, v0

    .line 761
    .local v2, locY:F
    const-string v3, "ElementLocator"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "scrollElementBy() factor="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " x="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, p2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " y="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, p3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " locX="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " locY="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 764
    iget v3, p0, Lcom/nemustech/regina/ElementLocator;->mZoomZPos:F

    invoke-virtual {p1, v1, v2, v3}, Lcom/nemustech/regina/Element;->locateRelatively(FFF)V

    .line 765
    return-void
.end method

.method public findElementByModel(Lcom/nemustech/tiffany/world/TFObject;)Lcom/nemustech/regina/Element;
    .locals 8
    .parameter "object"

    .prologue
    const/4 v7, 0x1

    .line 856
    const/4 v3, 0x0

    .line 857
    .local v3, resultElement:Lcom/nemustech/regina/Element;
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v5

    if-eqz v5, :cond_0

    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v5

    const/4 v6, 0x4

    if-ne v5, v6, :cond_6

    .line 859
    :cond_0
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceControlBtn()Lcom/nemustech/regina/ElementWorkspaceControlBtn;

    move-result-object v5

    invoke-virtual {v5, p1}, Lcom/nemustech/regina/ElementWorkspaceControlBtn;->isOwnerOf(Lcom/nemustech/tiffany/world/TFObject;)Z

    move-result v5

    if-eqz v5, :cond_1

    .line 860
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceControlBtn()Lcom/nemustech/regina/ElementWorkspaceControlBtn;

    move-result-object v5

    .line 884
    :goto_0
    return-object v5

    .line 861
    :cond_1
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getElementAppList()Lcom/nemustech/regina/ElementAppList;

    move-result-object v5

    invoke-virtual {v5}, Lcom/nemustech/regina/ElementAppList;->getAppListIndicator()Lcom/nemustech/regina/AppListIndicator;

    move-result-object v5

    invoke-virtual {v5, p1}, Lcom/nemustech/regina/AppListIndicator;->isOwnerOf(Lcom/nemustech/tiffany/world/TFObject;)Z

    move-result v5

    if-eqz v5, :cond_2

    .line 862
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getElementAppList()Lcom/nemustech/regina/ElementAppList;

    move-result-object v5

    invoke-virtual {v5}, Lcom/nemustech/regina/ElementAppList;->getAppListIndicator()Lcom/nemustech/regina/AppListIndicator;

    move-result-object v5

    goto :goto_0

    .line 863
    :cond_2
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getElementAppList()Lcom/nemustech/regina/ElementAppList;

    move-result-object v5

    invoke-virtual {v5, p1}, Lcom/nemustech/regina/ElementAppList;->isOwnerOf(Lcom/nemustech/tiffany/world/TFObject;)Z

    move-result v5

    if-eqz v5, :cond_3

    .line 864
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getElementAppList()Lcom/nemustech/regina/ElementAppList;

    move-result-object v5

    goto :goto_0

    .line 867
    :cond_3
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspace()Lcom/nemustech/regina/RGWorkspace;

    move-result-object v4

    .line 868
    .local v4, workSpace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v4}, Lcom/nemustech/regina/RGWorkspace;->getElementList()Ljava/util/ArrayList;

    move-result-object v1

    .line 870
    .local v1, elementArrList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .local v2, i$:Ljava/util/Iterator;
    :cond_4
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_5

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/nemustech/regina/Element;

    .line 871
    .local v0, e:Lcom/nemustech/regina/Element;
    invoke-virtual {v0, p1}, Lcom/nemustech/regina/Element;->isOwnerOf(Lcom/nemustech/tiffany/world/TFObject;)Z

    move-result v5

    if-ne v5, v7, :cond_4

    .line 872
    move-object v3, v0

    .end local v0           #e:Lcom/nemustech/regina/Element;
    .end local v1           #elementArrList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    .end local v2           #i$:Ljava/util/Iterator;
    .end local v4           #workSpace:Lcom/nemustech/regina/RGWorkspace;
    :cond_5
    :goto_1
    move-object v5, v3

    .line 884
    goto :goto_0

    .line 876
    :cond_6
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v5

    if-eq v5, v7, :cond_7

    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v5

    const/4 v6, 0x3

    if-ne v5, v6, :cond_5

    .line 878
    :cond_7
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v6}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v6

    aget-object v5, v5, v6

    invoke-virtual {v5, p1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->isOwnerOf(Lcom/nemustech/tiffany/world/TFObject;)Z

    move-result v5

    if-eqz v5, :cond_5

    .line 880
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v6}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v6

    aget-object v3, v5, v6

    goto :goto_1
.end method

.method public findHitElement(FFI)Lcom/nemustech/regina/Element;
    .locals 10
    .parameter "x"
    .parameter "y"
    .parameter "wsIndex"

    .prologue
    .line 888
    const/4 v3, 0x0

    .line 890
    .local v3, hitElement:Lcom/nemustech/regina/Element;
    new-instance v4, Landroid/graphics/Rect;

    invoke-direct {v4}, Landroid/graphics/Rect;-><init>()V

    .line 891
    .local v4, hitRect:Landroid/graphics/Rect;
    iget-object v8, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v8}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v8

    invoke-virtual {p0, v8, p3}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v7

    .line 893
    .local v7, ws:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v7}, Lcom/nemustech/regina/RGWorkspace;->getElementList()Ljava/util/ArrayList;

    move-result-object v2

    .line 894
    .local v2, elementArrList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v6

    .line 896
    .local v6, len:I
    const/4 v5, 0x0

    .local v5, i:I
    :goto_0
    if-ge v5, v6, :cond_0

    .line 897
    invoke-virtual {v2, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/nemustech/regina/Element;

    .line 898
    .local v1, e:Lcom/nemustech/regina/Element;
    instance-of v8, v1, Lcom/nemustech/regina/ElementAndroidWidget;

    if-eqz v8, :cond_1

    .line 899
    move-object v0, v1

    check-cast v0, Lcom/nemustech/regina/ElementAndroidWidget;

    move-object v8, v0

    invoke-virtual {v8}, Lcom/nemustech/regina/ElementAndroidWidget;->getHostView()Landroid/appwidget/AppWidgetHostView;

    move-result-object v8

    invoke-virtual {v8, v4}, Landroid/appwidget/AppWidgetHostView;->getHitRect(Landroid/graphics/Rect;)V

    .line 900
    float-to-int v8, p1

    float-to-int v9, p2

    invoke-virtual {v4, v8, v9}, Landroid/graphics/Rect;->contains(II)Z

    move-result v8

    const/4 v9, 0x1

    if-ne v8, v9, :cond_1

    .line 901
    move-object v3, v1

    .line 907
    .end local v1           #e:Lcom/nemustech/regina/Element;
    :cond_0
    return-object v3

    .line 896
    .restart local v1       #e:Lcom/nemustech/regina/Element;
    :cond_1
    add-int/lit8 v5, v5, 0x1

    goto :goto_0
.end method

.method public getCurrentWorkspace()Lcom/nemustech/regina/RGWorkspace;
    .locals 2

    .prologue
    .line 844
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v0

    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspaceIndex()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v0

    return-object v0
.end method

.method public getCurrentWorkspaceIndex()I
    .locals 2

    .prologue
    .line 741
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->getCurrentWorkspaceIndex()I

    move-result v0

    return v0
.end method

.method public getCurrentWorkspaceUID()I
    .locals 1

    .prologue
    .line 849
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspace()Lcom/nemustech/regina/RGWorkspace;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v0

    return v0
.end method

.method getHandler()Landroid/os/Handler;
    .locals 1

    .prologue
    .line 1282
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method public getMaxReginaWidgetSpace(Lcom/nemustech/regina/Element;Lcom/nemustech/regina/RGWorkspace;)Landroid/graphics/Rect;
    .locals 23
    .parameter "exceptionalElement"
    .parameter "targetWs"

    .prologue
    .line 995
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v16, v0

    const v17, 0x7f060002

    invoke-virtual/range {v16 .. v17}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v9

    .line 996
    .local v9, margin:I
    const/4 v15, 0x0

    .line 997
    .local v15, workspace:Lcom/nemustech/regina/RGWorkspace;
    if-nez p2, :cond_1

    .line 998
    invoke-virtual/range {p0 .. p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspace()Lcom/nemustech/regina/RGWorkspace;

    move-result-object v15

    .line 1003
    :goto_0
    invoke-virtual {v15}, Lcom/nemustech/regina/RGWorkspace;->getElementList()Ljava/util/ArrayList;

    move-result-object v7

    .line 1004
    .local v7, elementList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    new-instance v10, Landroid/graphics/Rect;

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/ElementLocator;->mScreenWidth:I

    move/from16 v16, v0

    sub-int v16, v16, v9

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/ElementLocator;->mScreenHeight:I

    move/from16 v17, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Lcom/nemustech/regina/ResourceCare;->getWCBHeight()I

    move-result v18

    sub-int v17, v17, v18

    move v0, v9

    int-to-float v0, v0

    move/from16 v18, v0

    const/high16 v19, 0x3e80

    mul-float v18, v18, v19

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    sub-int v17, v17, v18

    move-object v0, v10

    move v1, v9

    move v2, v9

    move/from16 v3, v16

    move/from16 v4, v17

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 1009
    .local v10, maxSpace:Landroid/graphics/Rect;
    new-instance v13, Landroid/graphics/Rect;

    invoke-direct {v13}, Landroid/graphics/Rect;-><init>()V

    .line 1010
    .local v13, rtUp:Landroid/graphics/Rect;
    new-instance v11, Landroid/graphics/Rect;

    invoke-direct {v11}, Landroid/graphics/Rect;-><init>()V

    .line 1011
    .local v11, rtDown:Landroid/graphics/Rect;
    new-instance v12, Landroid/graphics/Rect;

    invoke-direct {v12}, Landroid/graphics/Rect;-><init>()V

    .line 1016
    .local v12, rtElement:Landroid/graphics/Rect;
    invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v8

    .local v8, i$:Ljava/util/Iterator;
    :cond_0
    :goto_1
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v16

    if-eqz v16, :cond_3

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/nemustech/regina/Element;

    .line 1017
    .local v6, e:Lcom/nemustech/regina/Element;
    move-object v0, v6

    move-object/from16 v1, p1

    if-eq v0, v1, :cond_0

    .line 1019
    move-object/from16 v0, p0

    move-object v1, v12

    move-object v2, v6

    invoke-direct {v0, v1, v2}, Lcom/nemustech/regina/ElementLocator;->fillRect(Landroid/graphics/Rect;Lcom/nemustech/regina/Element;)V

    .line 1021
    invoke-static {v10, v12}, Landroid/graphics/Rect;->intersects(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z

    move-result v16

    if-eqz v16, :cond_0

    .line 1022
    move-object v0, v12

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move/from16 v16, v0

    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move/from16 v17, v0

    sub-int v14, v16, v17

    .line 1023
    .local v14, upSide:I
    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move/from16 v16, v0

    move-object v0, v12

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move/from16 v17, v0

    sub-int v5, v16, v17

    .line 1025
    .local v5, downSide:I
    if-le v14, v5, :cond_2

    .line 1026
    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->left:I

    move/from16 v16, v0

    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move/from16 v17, v0

    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->right:I

    move/from16 v18, v0

    move v0, v9

    int-to-float v0, v0

    move/from16 v19, v0

    const/high16 v20, 0x3e80

    mul-float v19, v19, v20

    move/from16 v0, v19

    float-to-int v0, v0

    move/from16 v19, v0

    move-object v0, v12

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move/from16 v20, v0

    move/from16 v0, v20

    int-to-float v0, v0

    move/from16 v20, v0

    move v0, v9

    int-to-float v0, v0

    move/from16 v21, v0

    const/high16 v22, 0x3e80

    mul-float v21, v21, v22

    sub-float v20, v20, v21

    move/from16 v0, v20

    float-to-int v0, v0

    move/from16 v20, v0

    move-object/from16 v0, p0

    move/from16 v1, v19

    move/from16 v2, v20

    invoke-direct {v0, v1, v2}, Lcom/nemustech/regina/ElementLocator;->getSnappedPosition(II)I

    move-result v19

    move-object v0, v10

    move/from16 v1, v16

    move/from16 v2, v17

    move/from16 v3, v18

    move/from16 v4, v19

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;->set(IIII)V

    goto/16 :goto_1

    .line 1000
    .end local v5           #downSide:I
    .end local v6           #e:Lcom/nemustech/regina/Element;
    .end local v7           #elementList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    .end local v8           #i$:Ljava/util/Iterator;
    .end local v10           #maxSpace:Landroid/graphics/Rect;
    .end local v11           #rtDown:Landroid/graphics/Rect;
    .end local v12           #rtElement:Landroid/graphics/Rect;
    .end local v13           #rtUp:Landroid/graphics/Rect;
    .end local v14           #upSide:I
    :cond_1
    move-object/from16 v15, p2

    goto/16 :goto_0

    .line 1035
    .restart local v5       #downSide:I
    .restart local v6       #e:Lcom/nemustech/regina/Element;
    .restart local v7       #elementList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    .restart local v8       #i$:Ljava/util/Iterator;
    .restart local v10       #maxSpace:Landroid/graphics/Rect;
    .restart local v11       #rtDown:Landroid/graphics/Rect;
    .restart local v12       #rtElement:Landroid/graphics/Rect;
    .restart local v13       #rtUp:Landroid/graphics/Rect;
    .restart local v14       #upSide:I
    :cond_2
    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->left:I

    move/from16 v16, v0

    move v0, v9

    int-to-float v0, v0

    move/from16 v17, v0

    const/high16 v18, 0x3e80

    mul-float v17, v17, v18

    move/from16 v0, v17

    float-to-int v0, v0

    move/from16 v17, v0

    move-object v0, v12

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move/from16 v18, v0

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    move v0, v9

    int-to-float v0, v0

    move/from16 v19, v0

    const/high16 v20, 0x3e80

    mul-float v19, v19, v20

    add-float v18, v18, v19

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move-object/from16 v0, p0

    move/from16 v1, v17

    move/from16 v2, v18

    invoke-direct {v0, v1, v2}, Lcom/nemustech/regina/ElementLocator;->getSnappedPosition(II)I

    move-result v17

    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->right:I

    move/from16 v18, v0

    move-object v0, v10

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move/from16 v19, v0

    move-object v0, v10

    move/from16 v1, v16

    move/from16 v2, v17

    move/from16 v3, v18

    move/from16 v4, v19

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;->set(IIII)V

    goto/16 :goto_1

    .line 1045
    .end local v5           #downSide:I
    .end local v6           #e:Lcom/nemustech/regina/Element;
    .end local v14           #upSide:I
    :cond_3
    return-object v10
.end method

.method public getPossibleLocation(Lcom/nemustech/regina/Element;[FLcom/nemustech/regina/RGWorkspace;)Z
    .locals 2
    .parameter "element"
    .parameter "position"
    .parameter "ws"

    .prologue
    const/4 v1, 0x1

    .line 1055
    instance-of v0, p1, Lcom/nemustech/regina/ElementAndroidWidget;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0, p3}, Lcom/nemustech/regina/ElementLocator;->prvGetPossibleLocation(Lcom/nemustech/regina/Element;[FZLcom/nemustech/regina/RGWorkspace;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 1057
    :cond_0
    invoke-direct {p0, p1, p2, v1, p3}, Lcom/nemustech/regina/ElementLocator;->prvGetPossibleLocation(Lcom/nemustech/regina/Element;[FZLcom/nemustech/regina/RGWorkspace;)Z

    move-result v0

    .line 1059
    :goto_0
    return v0

    :cond_1
    move v0, v1

    goto :goto_0
.end method

.method public getScreenHeight()I
    .locals 1

    .prologue
    .line 1490
    iget v0, p0, Lcom/nemustech/regina/ElementLocator;->mScreenHeight:I

    return v0
.end method

.method public getScreenWidth()I
    .locals 1

    .prologue
    .line 1486
    iget v0, p0, Lcom/nemustech/regina/ElementLocator;->mScreenWidth:I

    return v0
.end method

.method public getScrollState()I
    .locals 1

    .prologue
    .line 463
    iget v0, p0, Lcom/nemustech/regina/ElementLocator;->mScrollState:I

    return v0
.end method

.method public getWorkspace(I)Lcom/nemustech/regina/RGWorkspace;
    .locals 1
    .parameter "index"

    .prologue
    .line 808
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v0

    invoke-virtual {p0, v0, p1}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v0

    return-object v0
.end method

.method public getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;
    .locals 3
    .parameter "mode"
    .parameter "idx"

    .prologue
    .line 802
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v2, v2, p1

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v1

    .line 803
    .local v1, workspaceCount:I
    add-int v2, v1, p2

    rem-int v0, v2, v1

    .line 804
    .local v0, filteredIdx:I
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v2, v2, p1

    invoke-virtual {v2, v0}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItem(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/nemustech/regina/RGWorkspace;

    return-object p0
.end method

.method getWorkspaceBrowser()Lcom/nemustech/regina/WorkspaceBrowser;
    .locals 2

    .prologue
    .line 1260
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    return-object v0
.end method

.method public getWorkspaceByUID(I)Lcom/nemustech/regina/RGWorkspace;
    .locals 5
    .parameter "uid"

    .prologue
    .line 786
    const/4 v2, 0x0

    .local v2, mode:I
    :goto_0
    const/4 v4, 0x2

    if-ge v2, v4, :cond_2

    .line 787
    iget-object v4, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v4, v4, v2

    invoke-virtual {v4}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v0

    .line 788
    .local v0, count:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_1
    if-ge v1, v0, :cond_1

    .line 789
    iget-object v4, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v4, v4, v2

    invoke-virtual {v4, v1}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItem(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/nemustech/regina/RGWorkspace;

    .line 791
    .local v3, workspace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v3}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v4

    if-ne v4, p1, :cond_0

    move-object v4, v3

    .line 795
    .end local v0           #count:I
    .end local v1           #i:I
    .end local v3           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :goto_2
    return-object v4

    .line 788
    .restart local v0       #count:I
    .restart local v1       #i:I
    .restart local v3       #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 786
    .end local v3           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 795
    .end local v0           #count:I
    .end local v1           #i:I
    :cond_2
    const/4 v4, 0x0

    goto :goto_2
.end method

.method public getWorkspaceControlBtn()Lcom/nemustech/regina/ElementWorkspaceControlBtn;
    .locals 1

    .prologue
    .line 825
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceControlBtn()Lcom/nemustech/regina/ElementWorkspaceControlBtn;

    move-result-object v0

    return-object v0
.end method

.method public getWorkspaceCount()I
    .locals 2

    .prologue
    .line 736
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    invoke-virtual {v0}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v0

    return v0
.end method

.method public getWorkspaceCountByType(I)I
    .locals 3
    .parameter "wsType"

    .prologue
    .line 768
    const/4 v0, 0x0

    .line 769
    .local v0, cnt:I
    packed-switch p1, :pswitch_data_0

    .line 777
    new-instance v1, Ljava/lang/IllegalStateException;

    const-string v2, "The workspace type of element is WRONG !!!"

    invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 771
    :pswitch_0
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    const/4 v2, 0x0

    aget-object v1, v1, v2

    invoke-virtual {v1}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v0

    .line 781
    :goto_0
    return v0

    .line 774
    :pswitch_1
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    const/4 v2, 0x1

    aget-object v1, v1, v2

    invoke-virtual {v1}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v0

    .line 775
    goto :goto_0

    .line 769
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public getWorkspaceHolder()Lcom/nemustech/tiffany/world/TFHolder;
    .locals 2

    .prologue
    .line 834
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    return-object v0
.end method

.method public getWorkspaceIndexOf(Lcom/nemustech/regina/RGWorkspace;)I
    .locals 4
    .parameter "workspace"

    .prologue
    const/4 v3, -0x1

    .line 812
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    const/4 v2, 0x2

    if-ge v0, v2, :cond_1

    .line 813
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v2, v2, v0

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemList()Ljava/util/LinkedList;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/util/LinkedList;->indexOf(Ljava/lang/Object;)I

    move-result v1

    .line 814
    .local v1, index:I
    if-eq v1, v3, :cond_0

    move v2, v1

    .line 817
    .end local v1           #index:I
    :goto_1
    return v2

    .line 812
    .restart local v1       #index:I
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .end local v1           #index:I
    :cond_1
    move v2, v3

    .line 817
    goto :goto_1
.end method

.method public getWorkspaceProvider()[Lcom/nemustech/tiffany/world/TFObjectProvider;
    .locals 1

    .prologue
    .line 839
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    return-object v0
.end method

.method public getWorkspaceSwitcher()Lcom/nemustech/regina/ElementWorkspaceSwitcher;
    .locals 2

    .prologue
    .line 830
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    return-object v0
.end method

.method public getWorkspaceView(II)Lcom/nemustech/regina/WorkspaceView;
    .locals 1
    .parameter "mode"
    .parameter "idx"

    .prologue
    .line 821
    invoke-virtual {p0, p1, p2}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspace;->getWorkspaceView()Lcom/nemustech/regina/WorkspaceView;

    move-result-object v0

    return-object v0
.end method

.method public getZoomCorrectionRatio()F
    .locals 1

    .prologue
    .line 751
    iget v0, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    return v0
.end method

.method public hideSecretWorkspace()V
    .locals 5

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 445
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f070082

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    .line 447
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v0, v0, v3

    invoke-virtual {v0, v4}, Lcom/nemustech/regina/RGWorkspaceHolder;->setVisibility(Z)V

    .line 448
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v0, v0, v4

    invoke-virtual {v0, v3}, Lcom/nemustech/regina/RGWorkspaceHolder;->setVisibility(Z)V

    .line 449
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v3}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v0

    invoke-virtual {v0, v3}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 452
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v4}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v0

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 454
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v4}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 455
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v3}, Lcom/nemustech/regina/ReginaLauncher;->setSecretMode(Z)V

    .line 456
    return-void
.end method

.method public hideWorkspaceNameView()V
    .locals 2

    .prologue
    .line 420
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceName()Landroid/widget/TextView;

    move-result-object v0

    .line 421
    .local v0, workspaceNameView:Landroid/widget/TextView;
    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 422
    invoke-virtual {v0}, Landroid/widget/TextView;->clearAnimation()V

    .line 423
    return-void
.end method

.method public isWorkspaceEndlessMode()Z
    .locals 2

    .prologue
    .line 746
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->isEndlessMode()Z

    move-result v0

    return v0
.end method

.method public logHolderHierarchy(Z)V
    .locals 11
    .parameter "isSecretMode"

    .prologue
    const/4 v10, 0x1

    .line 1494
    const/4 v2, 0x0

    .line 1496
    .local v2, idx:I
    if-eqz p1, :cond_0

    move v3, v10

    .line 1498
    .local v3, mode:I
    :goto_0
    const-string v7, "ElementLocator"

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string v9, "################# TIFFANY HOLDER HIERARCHY MODE "

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, " START #################"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8, v10}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 1500
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v7, v7, v3

    invoke-virtual {v7}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemList()Ljava/util/LinkedList;

    move-result-object v6

    .line 1502
    .local v6, workspaces:Ljava/util/LinkedList;,"Ljava/util/LinkedList<Lcom/nemustech/tiffany/world/TFObject;>;"
    invoke-virtual {v6}, Ljava/util/LinkedList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-eqz v7, :cond_1

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/nemustech/tiffany/world/TFObject;

    .line 1503
    .local v4, rgWs:Lcom/nemustech/tiffany/world/TFObject;
    move-object v0, v4

    check-cast v0, Lcom/nemustech/regina/RGWorkspace;

    move-object v5, v0

    .line 1504
    .local v5, rgws:Lcom/nemustech/regina/RGWorkspace;
    const-string v7, "ElementLocator"

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string v9, "RGWorkspace="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, " uid="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v5}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, " workspaceView="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v5}, Lcom/nemustech/regina/RGWorkspace;->getWorkspaceView()Lcom/nemustech/regina/WorkspaceView;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, " workspaceIndex="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8, v10}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    goto :goto_1

    .line 1496
    .end local v1           #i$:Ljava/util/Iterator;
    .end local v3           #mode:I
    .end local v4           #rgWs:Lcom/nemustech/tiffany/world/TFObject;
    .end local v5           #rgws:Lcom/nemustech/regina/RGWorkspace;
    .end local v6           #workspaces:Ljava/util/LinkedList;,"Ljava/util/LinkedList<Lcom/nemustech/tiffany/world/TFObject;>;"
    :cond_0
    const/4 v7, 0x0

    move v3, v7

    goto :goto_0

    .line 1509
    .restart local v1       #i$:Ljava/util/Iterator;
    .restart local v3       #mode:I
    .restart local v6       #workspaces:Ljava/util/LinkedList;,"Ljava/util/LinkedList<Lcom/nemustech/tiffany/world/TFObject;>;"
    :cond_1
    const-string v7, "ElementLocator"

    const-string v8, "################# TIFFANY HOLDER HIERARCHY END #################"

    invoke-static {v7, v8, v10}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 1512
    return-void
.end method

.method public refreshElementShortcutInAllWorkspaces()V
    .locals 6

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 648
    invoke-virtual {p0, v4}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceCountByType(I)I

    move-result v1

    .line 649
    .local v1, normalSize:I
    const/4 v0, 0x0

    .local v0, index:I
    :goto_0
    if-ge v0, v1, :cond_0

    .line 650
    invoke-virtual {p0, v4, v0}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v3

    .line 651
    .local v3, workspace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v3}, Lcom/nemustech/regina/RGWorkspace;->refreshElementShorcutIcon()V

    .line 649
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 654
    .end local v3           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_0
    invoke-virtual {p0, v5}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceCountByType(I)I

    move-result v2

    .line 655
    .local v2, secretSize:I
    const/4 v0, 0x0

    :goto_1
    if-ge v0, v2, :cond_1

    .line 656
    invoke-virtual {p0, v5, v0}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(II)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v3

    .line 657
    .restart local v3       #workspace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v3}, Lcom/nemustech/regina/RGWorkspace;->refreshElementShorcutIcon()V

    .line 655
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 659
    .end local v3           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_1
    return-void
.end method

.method public refreshLayout()V
    .locals 11

    .prologue
    .line 503
    iget-object v9, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v10, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v10}, Lcom/nemustech/regina/ReginaLauncher;->isSecretMode()Z

    move-result v10

    invoke-virtual {v9, v10}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v6

    .line 505
    .local v6, viewGroup:Landroid/view/ViewGroup;
    invoke-virtual {v6}, Landroid/view/ViewGroup;->getMeasuredWidth()I

    move-result v8

    .line 506
    .local v8, viewGroupWidth:I
    invoke-virtual {v6}, Landroid/view/ViewGroup;->getMeasuredHeight()I

    move-result v7

    .line 507
    .local v7, viewGroupHeight:I
    const/4 v9, 0x0

    sub-int v2, v9, v8

    .line 508
    .local v2, childLeft:I
    invoke-virtual {v6}, Landroid/view/ViewGroup;->getTop()I

    move-result v5

    .line 509
    .local v5, top:I
    invoke-virtual {v6}, Landroid/view/ViewGroup;->getBottom()I

    move-result v0

    .line 511
    .local v0, bottom:I
    invoke-virtual {v6}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v3

    .line 512
    .local v3, count:I
    const/4 v4, 0x0

    .local v4, i:I
    :goto_0
    if-ge v4, v3, :cond_1

    .line 513
    invoke-virtual {v6, v4}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    .line 514
    .local v1, child:Landroid/view/View;
    invoke-virtual {v1}, Landroid/view/View;->getVisibility()I

    move-result v9

    const/16 v10, 0x8

    if-eq v9, v10, :cond_0

    .line 515
    invoke-virtual {v1, v8, v7}, Landroid/view/View;->measure(II)V

    .line 516
    add-int v9, v2, v8

    invoke-virtual {v1, v2, v5, v9, v0}, Landroid/view/View;->layout(IIII)V

    .line 523
    add-int/2addr v2, v8

    .line 512
    :cond_0
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 526
    .end local v1           #child:Landroid/view/View;
    :cond_1
    return-void
.end method

.method public removeElementByAppWidgetId(ZI)V
    .locals 6
    .parameter "isSecretMode"
    .parameter "appWidgetId"

    .prologue
    .line 1441
    const/4 v4, 0x0

    .line 1442
    .local v4, workspaceType:I
    const/4 v5, 0x1

    if-ne p1, v5, :cond_0

    .line 1443
    const/4 v4, 0x1

    .line 1446
    :cond_0
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v5, v5, v4

    invoke-virtual {v5}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItemCount()I

    move-result v0

    .line 1447
    .local v0, count:I
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    if-ge v2, v0, :cond_1

    .line 1448
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v5, v5, v4

    invoke-virtual {v5, v2}, Lcom/nemustech/tiffany/world/TFObjectProvider;->getItem(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/nemustech/regina/RGWorkspace;

    .line 1450
    .local v3, workspace:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v3, p2}, Lcom/nemustech/regina/RGWorkspace;->findElementByAppWidgetId(I)Lcom/nemustech/regina/Element;

    move-result-object v1

    .line 1451
    .local v1, element:Lcom/nemustech/regina/Element;
    if-eqz v1, :cond_2

    .line 1452
    invoke-virtual {v3, v1}, Lcom/nemustech/regina/RGWorkspace;->removeElement(Lcom/nemustech/regina/Element;)Z

    .line 1453
    iget-object v5, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v5, v1}, Lcom/nemustech/regina/ReginaLauncher;->deleteElementFromDatabase(Lcom/nemustech/regina/Element;)V

    .line 1457
    .end local v1           #element:Lcom/nemustech/regina/Element;
    .end local v3           #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_1
    return-void

    .line 1447
    .restart local v1       #element:Lcom/nemustech/regina/Element;
    .restart local v3       #workspace:Lcom/nemustech/regina/RGWorkspace;
    :cond_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_0
.end method

.method public removeWorkspace(II)V
    .locals 9
    .parameter "workspaceMode"
    .parameter "idx"

    .prologue
    .line 550
    const-string v6, "WorkspaceExploring"

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "Removing workspace - workspace index: "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, " GUID: "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {p0, p2}, Lcom/nemustech/regina/ElementLocator;->getWorkspace(I)Lcom/nemustech/regina/RGWorkspace;

    move-result-object v8

    invoke-virtual {v8}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    const/4 v8, 0x1

    invoke-static {v6, v7, v8}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 555
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceProvider:[Lcom/nemustech/tiffany/world/TFObjectProvider;

    aget-object v6, v6, p1

    invoke-virtual {v6, p2}, Lcom/nemustech/tiffany/world/TFObjectProvider;->removeItemAt(I)Lcom/nemustech/tiffany/world/TFObject;

    move-result-object v5

    check-cast v5, Lcom/nemustech/regina/RGWorkspace;

    .line 557
    .local v5, workspaceToRemove:Lcom/nemustech/regina/RGWorkspace;
    invoke-virtual {v5}, Lcom/nemustech/regina/RGWorkspace;->getElementPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v6

    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    invoke-virtual {v6, v7}, Lcom/nemustech/tiffany/world/TFPanel;->detachFrom(Lcom/nemustech/tiffany/world/TFWorld;)V

    .line 558
    invoke-virtual {v5}, Lcom/nemustech/regina/RGWorkspace;->getElementList()Ljava/util/ArrayList;

    move-result-object v2

    .line 559
    .local v2, elementList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/nemustech/regina/Element;>;"
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v1

    .line 560
    .local v1, elementCount:I
    const/4 v3, 0x0

    .local v3, i:I
    :goto_0
    if-ge v3, v1, :cond_0

    .line 561
    const/4 v6, 0x0

    invoke-virtual {v2, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/nemustech/regina/Element;

    .line 562
    .local v0, element:Lcom/nemustech/regina/Element;
    invoke-virtual {v5, v0}, Lcom/nemustech/regina/RGWorkspace;->removeElement(Lcom/nemustech/regina/Element;)Z

    .line 560
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 565
    .end local v0           #element:Lcom/nemustech/regina/Element;
    :cond_0
    invoke-virtual {v5}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v4

    .line 567
    .local v4, removedUid:I
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v6, v4}, Lcom/nemustech/regina/RUtils;->removeWallpaperFiles(Landroid/content/Context;I)Z

    .line 568
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v6, v4}, Lcom/nemustech/regina/ReginaLauncher;->deleteElementsInWorkspaceFromDatabase(I)V

    .line 569
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v6}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v6

    invoke-virtual {v6, v4}, Lcom/nemustech/regina/ReginaPreference;->removeWorkspace(I)V

    .line 571
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mElementWorkspaceSwitcher:[Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    aget-object v6, v6, p1

    invoke-virtual {v6, p2}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->removeWorkspaceThumb(I)V

    .line 572
    iget-object v6, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceBrowser:[Lcom/nemustech/regina/WorkspaceBrowser;

    aget-object v6, v6, p1

    invoke-virtual {v5}, Lcom/nemustech/regina/RGWorkspace;->getUID()I

    move-result v7

    invoke-virtual {v6, p2, v7}, Lcom/nemustech/regina/WorkspaceBrowser;->removeWorkspaceThumb(II)V

    .line 573
    return-void
.end method

.method repositionWorkspace()V
    .locals 2

    .prologue
    .line 1377
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nemustech/tiffany/world/TFHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFHolder$MoveAnimation;

    move-result-object v0

    const/16 v1, 0x64

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFHolder$MoveAnimation;->repositionObjects(I)Z

    .line 1378
    return-void
.end method

.method repositionWorkspace(Lcom/nemustech/tiffany/world/TFAnimation$AnimationEventListener;)V
    .locals 3
    .parameter "listener"

    .prologue
    .line 1387
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v0

    check-cast v0, Lcom/nemustech/regina/RGWorkspaceHolder;

    .line 1388
    .local v0, workspaceHolder:Lcom/nemustech/regina/RGWorkspaceHolder;
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v1

    invoke-virtual {v1, p1}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->setAnimationEventListener(Lcom/nemustech/tiffany/world/TFAnimation$AnimationEventListener;)V

    .line 1389
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v1

    const/16 v2, 0x64

    invoke-virtual {v1, v2}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->repositionObjects(I)Z

    .line 1390
    return-void
.end method

.method scrollWorkspace(F)V
    .locals 4
    .parameter "scrollValue"

    .prologue
    .line 1248
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v0

    check-cast v0, Lcom/nemustech/regina/RGWorkspaceHolder;

    .line 1249
    .local v0, holder:Lcom/nemustech/regina/RGWorkspaceHolder;
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->getLockStatus()Z

    move-result v3

    if-nez v3, :cond_0

    .line 1250
    neg-float v3, p1

    float-to-int v1, v3

    .line 1252
    .local v1, scrollPixel:I
    iget-object v3, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3, v1}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v2

    .line 1254
    .local v2, scrollTFUnit:F
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v3

    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->reset()V

    .line 1255
    invoke-virtual {v0, v2}, Lcom/nemustech/regina/RGWorkspaceHolder;->moveHeadModelStep(F)Z

    .line 1257
    .end local v1           #scrollPixel:I
    .end local v2           #scrollTFUnit:F
    :cond_0
    return-void
.end method

.method scrollWorkspace(II)V
    .locals 2
    .parameter "wsIndex"
    .parameter "delay"

    .prologue
    .line 1264
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v0

    check-cast v0, Lcom/nemustech/regina/RGWorkspaceHolder;

    .line 1265
    .local v0, workspaceHolder:Lcom/nemustech/regina/RGWorkspaceHolder;
    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v1

    invoke-virtual {v1}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->reset()V

    .line 1266
    invoke-virtual {v0, p1, p2}, Lcom/nemustech/regina/RGWorkspaceHolder;->setHeadItemIndex(II)V

    .line 1267
    return-void
.end method

.method scrollWorkspaceToDir(II)V
    .locals 11
    .parameter "dir"
    .parameter "moveDelay"

    .prologue
    const/4 v10, 0x0

    const/4 v9, 0x1

    .line 1315
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v7}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v7

    const/4 v8, 0x6

    if-eq v7, v8, :cond_0

    .line 1317
    const-string v7, "ElementLocator"

    const-string v8, "Workspace scroll requested but ignored due to invalid view mode"

    invoke-static {v7, v8}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 1318
    invoke-virtual {p0, v10}, Lcom/nemustech/regina/ElementLocator;->setScrollState(I)V

    .line 1368
    :goto_0
    return-void

    .line 1322
    :cond_0
    const/4 v5, 0x0

    .line 1323
    .local v5, wsFirstIdx:I
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceCount()I

    move-result v7

    sub-int v6, v7, v9

    .line 1324
    .local v6, wsLastIdx:I
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getCurrentWorkspaceIndex()I

    move-result v1

    .line 1325
    .local v1, curWorkspaceIdx:I
    invoke-virtual {p0}, Lcom/nemustech/regina/ElementLocator;->getWorkspaceHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v4

    check-cast v4, Lcom/nemustech/regina/RGWorkspaceHolder;

    .line 1326
    .local v4, workspaceHolder:Lcom/nemustech/regina/RGWorkspaceHolder;
    invoke-virtual {v4}, Lcom/nemustech/regina/RGWorkspaceHolder;->isEndlessMode()Z

    move-result v2

    .line 1327
    .local v2, endless:Z
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v7, v9}, Lcom/nemustech/regina/ReginaLauncher;->setRenderAffinity(Z)V

    .line 1329
    const v3, 0x3cf5c28f

    .line 1330
    .local v3, velocity:F
    const v0, 0x37fba882

    .line 1332
    .local v0, accelation:F
    packed-switch p1, :pswitch_data_0

    :pswitch_0
    goto :goto_0

    .line 1334
    :pswitch_1
    if-ne v1, v5, :cond_2

    .line 1335
    if-eqz v2, :cond_1

    .line 1336
    invoke-virtual {p0, v6, p2}, Lcom/nemustech/regina/ElementLocator;->scrollWorkspace(II)V

    goto :goto_0

    .line 1338
    :cond_1
    invoke-virtual {v4}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v7

    invoke-virtual {v7, v9}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->reset(Z)V

    .line 1339
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v7, v10}, Lcom/nemustech/regina/ReginaLauncher;->setViewMode(I)V

    .line 1342
    invoke-virtual {p0, v9}, Lcom/nemustech/regina/ElementLocator;->toastReachedEndWorkspace(I)V

    .line 1343
    invoke-virtual {p0, v10}, Lcom/nemustech/regina/ElementLocator;->setScrollState(I)V

    goto :goto_0

    .line 1347
    :cond_2
    sub-int v7, v1, v9

    invoke-virtual {p0, v7, p2}, Lcom/nemustech/regina/ElementLocator;->scrollWorkspace(II)V

    goto :goto_0

    .line 1351
    :pswitch_2
    if-ne v1, v6, :cond_4

    .line 1352
    if-eqz v2, :cond_3

    .line 1353
    invoke-virtual {p0, v5, p2}, Lcom/nemustech/regina/ElementLocator;->scrollWorkspace(II)V

    goto :goto_0

    .line 1355
    :cond_3
    invoke-virtual {v4}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v7

    invoke-virtual {v7, v9}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->reset(Z)V

    .line 1356
    iget-object v7, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v7, v10}, Lcom/nemustech/regina/ReginaLauncher;->setViewMode(I)V

    .line 1359
    const/4 v7, -0x1

    invoke-virtual {p0, v7}, Lcom/nemustech/regina/ElementLocator;->toastReachedEndWorkspace(I)V

    .line 1360
    invoke-virtual {p0, v10}, Lcom/nemustech/regina/ElementLocator;->setScrollState(I)V

    goto :goto_0

    .line 1364
    :cond_4
    add-int/lit8 v7, v1, 0x1

    invoke-virtual {p0, v7, p2}, Lcom/nemustech/regina/ElementLocator;->scrollWorkspace(II)V

    goto :goto_0

    .line 1332
    nop

    :pswitch_data_0
    .packed-switch -0x1
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method scrollWorkspaceToDirWithPostDelay(III)V
    .locals 4
    .parameter "dir"
    .parameter "moveDelay"
    .parameter "postDelay"

    .prologue
    .line 1270
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mScrollRunnable:Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 1272
    if-lez p3, :cond_0

    .line 1273
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mScrollRunnable:Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;

    invoke-virtual {v0, p2}, Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;->setMoveDelay(I)V

    .line 1274
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mScrollRunnable:Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;

    invoke-virtual {v0, p1}, Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;->setMoveDir(I)V

    .line 1275
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mScrollRunnable:Lcom/nemustech/regina/ElementLocator$WorkspaceScrollRunnable;

    int-to-long v2, p3

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 1279
    :goto_0
    return-void

    .line 1277
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/nemustech/regina/ElementLocator;->scrollWorkspaceToDir(II)V

    goto :goto_0
.end method

.method public setScrollState(I)V
    .locals 0
    .parameter "state"

    .prologue
    .line 459
    iput p1, p0, Lcom/nemustech/regina/ElementLocator;->mScrollState:I

    .line 460
    return-void
.end method

.method setWorkspaceAnimationListener(Lcom/nemustech/tiffany/world/TFAnimation$AnimationEventListener;)V
    .locals 2
    .parameter "animationListener"

    .prologue
    .line 1243
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceMode()I

    move-result v1

    aget-object v0, v0, v1

    invoke-virtual {v0}, Lcom/nemustech/regina/RGWorkspaceHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->setAnimationEventListener(Lcom/nemustech/tiffany/world/TFAnimation$AnimationEventListener;)V

    .line 1245
    return-void
.end method

.method public showSecretToast()V
    .locals 3

    .prologue
    .line 426
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f070081

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    .line 427
    return-void
.end method

.method public showSecretWorkspace()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x1

    .line 430
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v0, v0, v3

    invoke-virtual {v0, v3}, Lcom/nemustech/regina/RGWorkspaceHolder;->setVisibility(Z)V

    .line 431
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceHolder:[Lcom/nemustech/regina/RGWorkspaceHolder;

    aget-object v0, v0, v2

    invoke-virtual {v0, v2}, Lcom/nemustech/regina/RGWorkspaceHolder;->setVisibility(Z)V

    .line 432
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v3}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v0

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 435
    invoke-direct {p0}, Lcom/nemustech/regina/ElementLocator;->addSecretWorkspaceViewAll()V

    .line 436
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v2}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceViewGroup(Z)Landroid/view/ViewGroup;

    move-result-object v0

    invoke-virtual {v0, v3}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 437
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v2}, Lcom/nemustech/regina/ReginaLauncher;->setSecretMode(Z)V

    .line 438
    iget-boolean v0, p0, Lcom/nemustech/regina/ElementLocator;->mIsSecretWorkspaceCached:Z

    if-nez v0, :cond_0

    .line 439
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0, v2}, Lcom/nemustech/regina/ReginaLauncher;->cacheWorkspaceThumb(Z)V

    .line 440
    iput-boolean v2, p0, Lcom/nemustech/regina/ElementLocator;->mIsSecretWorkspaceCached:Z

    .line 442
    :cond_0
    return-void
.end method

.method public showWorkspaceNameView(I)V
    .locals 4
    .parameter "wsIndex"

    .prologue
    .line 372
    move v0, p1

    .line 373
    .local v0, index:I
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v2}, Lcom/nemustech/regina/ReginaLauncher;->getWorkspaceName()Landroid/widget/TextView;

    move-result-object v1

    .line 374
    .local v1, workspaceNameView:Landroid/widget/TextView;
    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    new-instance v3, Lcom/nemustech/regina/ElementLocator$4;

    invoke-direct {v3, p0, v0, v1}, Lcom/nemustech/regina/ElementLocator$4;-><init>(Lcom/nemustech/regina/ElementLocator;ILandroid/widget/TextView;)V

    invoke-virtual {v2, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 417
    return-void
.end method

.method toastReachedEndWorkspace(I)V
    .locals 4
    .parameter "direction"

    .prologue
    .line 1288
    if-eqz p1, :cond_3

    .line 1289
    iget-boolean v0, p0, Lcom/nemustech/regina/ElementLocator;->mIsShowEndWorkspaceToast:Z

    if-nez v0, :cond_1

    .line 1290
    if-lez p1, :cond_2

    .line 1291
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f0700e7

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceEndToast:Landroid/widget/Toast;

    .line 1300
    :cond_0
    :goto_0
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/nemustech/regina/ElementLocator;->mIsShowEndWorkspaceToast:Z

    .line 1301
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mEndToastResetRunnable:Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;

    const-wide/16 v2, 0x7d0

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 1310
    :cond_1
    :goto_1
    return-void

    .line 1295
    :cond_2
    if-gez p1, :cond_0

    .line 1296
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f0700e8

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceEndToast:Landroid/widget/Toast;

    goto :goto_0

    .line 1304
    :cond_3
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceEndToast:Landroid/widget/Toast;

    if-eqz v0, :cond_4

    .line 1305
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mWorkspaceEndToast:Landroid/widget/Toast;

    invoke-virtual {v0}, Landroid/widget/Toast;->cancel()V

    .line 1307
    :cond_4
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mEndToastResetRunnable:Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 1308
    iget-object v0, p0, Lcom/nemustech/regina/ElementLocator;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mEndToastResetRunnable:Lcom/nemustech/regina/ElementLocator$EndToastResetRunnable;

    const-wide/16 v2, 0x1f4

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    goto :goto_1
.end method

.method public zoomElement(Lcom/nemustech/regina/Element;Z)V
    .locals 5
    .parameter "e"
    .parameter "zoomIn"

    .prologue
    const/4 v4, 0x0

    .line 914
    iget v1, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    cmpg-float v1, v1, v4

    if-gez v1, :cond_0

    .line 915
    iget-object v1, p0, Lcom/nemustech/regina/ElementLocator;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    iget-object v2, p0, Lcom/nemustech/regina/ElementLocator;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    iget v3, p0, Lcom/nemustech/regina/ElementLocator;->mZoomZPos:F

    invoke-static {v1, v2, v4, v3}, Lcom/nemustech/regina/RUtils;->calcCorrectionRatio(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;FF)F

    move-result v1

    iput v1, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    .line 918
    :cond_0
    const/4 v1, 0x1

    if-ne p2, v1, :cond_2

    .line 919
    instance-of v1, p1, Lcom/nemustech/regina/ElementAndroidWidget;

    if-eqz v1, :cond_1

    .line 920
    move-object v0, p1

    check-cast v0, Lcom/nemustech/regina/ElementAndroidWidget;

    move-object v1, v0

    invoke-virtual {v1}, Lcom/nemustech/regina/ElementAndroidWidget;->unPressHostView()V

    .line 921
    move-object v0, p1

    check-cast v0, Lcom/nemustech/regina/ElementAndroidWidget;

    move-object v1, v0

    invoke-virtual {v1}, Lcom/nemustech/regina/ElementAndroidWidget;->forceUpdatePanel()V

    .line 923
    :cond_1
    iget v1, p0, Lcom/nemustech/regina/ElementLocator;->mZoomZPos:F

    iget v2, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    invoke-virtual {p1, p2, v1, v2}, Lcom/nemustech/regina/Element;->zoom(ZFF)V

    .line 927
    :goto_0
    return-void

    .line 925
    :cond_2
    iget v1, p0, Lcom/nemustech/regina/ElementLocator;->mDefaultZPos:F

    const/high16 v2, 0x3f80

    iget v3, p0, Lcom/nemustech/regina/ElementLocator;->mZoomCorrectionRatio:F

    div-float/2addr v2, v3

    invoke-virtual {p1, p2, v1, v2}, Lcom/nemustech/regina/Element;->zoom(ZFF)V

    goto :goto_0
.end method
